From bd61faf660fbee6ce9b92c91e693bf4a1d1dab4f Mon Sep 17 00:00:00 2001 From: BiggerRain <15911122312@163.COM> Date: Sun, 2 Nov 2025 10:58:51 +0800 Subject: [PATCH] fix: console code error (#956) --- src/components/Search/DropdownList.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Search/DropdownList.tsx b/src/components/Search/DropdownList.tsx index d2ef9b2c..2d739834 100644 --- a/src/components/Search/DropdownList.tsx +++ b/src/components/Search/DropdownList.tsx @@ -173,11 +173,12 @@ function DropdownList({ )} {items.map((hit) => { - const currentIndex = hit.document.index || 0; + const currentIndex = hit.document.index ?? 0; + const itemKey = `${sourceName}-${hit.document.id ?? currentIndex}`; return (