fix: console code error (#956)

This commit is contained in:
BiggerRain
2025-11-02 10:58:51 +08:00
committed by GitHub
parent 0e48f4f71c
commit bd61faf660

View File

@@ -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 (
<DropdownListItem
key={hit.document.id}
key={itemKey}
item={hit.document}
selectedIndex={selectedIndex}
currentIndex={currentIndex}