diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 13d6d26..fafa68d 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -141,7 +141,7 @@ export const Navbar = () => { ); }); - if (candidates) { + if (candidates.length) { const nextHighlightedNode = candidates[0].id as string; if (nextHighlightedNode === highlightedNode) return;