mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 11:37:47 +01:00
fix: console code error (#956)
This commit is contained in:
@@ -173,11 +173,12 @@ function DropdownList({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{items.map((hit) => {
|
{items.map((hit) => {
|
||||||
const currentIndex = hit.document.index || 0;
|
const currentIndex = hit.document.index ?? 0;
|
||||||
|
const itemKey = `${sourceName}-${hit.document.id ?? currentIndex}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownListItem
|
<DropdownListItem
|
||||||
key={hit.document.id}
|
key={itemKey}
|
||||||
item={hit.document}
|
item={hit.document}
|
||||||
selectedIndex={selectedIndex}
|
selectedIndex={selectedIndex}
|
||||||
currentIndex={currentIndex}
|
currentIndex={currentIndex}
|
||||||
|
|||||||
Reference in New Issue
Block a user