From fce686410489a858e95d3fc0958b673d42c04a2c Mon Sep 17 00:00:00 2001 From: Pedro Oliveira Date: Wed, 24 Jan 2024 22:58:51 +0000 Subject: [PATCH] Search crashes the app (#168) --- src/components/Navbar/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;