From bf07610c431aa8d3b12e56cf66695f33f3cc685b Mon Sep 17 00:00:00 2001 From: Ou Date: Fri, 22 Nov 2024 00:48:03 +0800 Subject: [PATCH] fix: search bar crash as new source added --- src/components/column/dnd.tsx | 3 --- src/components/common/search-bar/index.tsx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/column/dnd.tsx b/src/components/column/dnd.tsx index 2e671d8..dbe2b6f 100644 --- a/src/components/column/dnd.tsx +++ b/src/components/column/dnd.tsx @@ -95,9 +95,6 @@ function DndWrapper({ items, setItems, children }: PropsWithChildren<{ wait: AnimationDuration, }) const { el } = useAtomValue(goToTopAtom) - useEffect(() => { - console.log(el) - }, [el]) return ( {children} diff --git a/src/components/common/search-bar/index.tsx b/src/components/common/search-bar/index.tsx index daf125d..bfab7c7 100644 --- a/src/components/common/search-bar/index.tsx +++ b/src/components/common/search-bar/index.tsx @@ -47,7 +47,7 @@ export function SearchBar() { title: source.title, column: source.column ? columns[source.column].zh : "未分类", name: source.name, - pinyin: pinyin?.[k as keyof typeof pinyin], + pinyin: pinyin?.[k as keyof typeof pinyin] ?? "", }))) , [], )