From 307ea39413f7537fb4e5cbb8cf9bc6835b1ce33d Mon Sep 17 00:00:00 2001 From: Sam Hoang Van Date: Tue, 3 Jun 2025 11:29:19 +0700 Subject: [PATCH] fix: handle undefined search index in getFilteredThreads (#5175) --- web-app/src/hooks/useThreads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-app/src/hooks/useThreads.ts b/web-app/src/hooks/useThreads.ts index b3cdd7951..eac147ebe 100644 --- a/web-app/src/hooks/useThreads.ts +++ b/web-app/src/hooks/useThreads.ts @@ -66,7 +66,7 @@ export const useThreads = create()( } let currentIndex = searchIndex - if (!currentIndex) { + if (!currentIndex?.find) { currentIndex = new Fzf(Object.values(threads), { selector: (item: Thread) => item.title, })