fix: resolve react key errors of fuzzy mode search results

This commit is contained in:
EnixCoda 2022-01-14 16:54:19 +08:00
parent 4a705958c4
commit 2d38788ac9

View file

@ -31,7 +31,7 @@ export const fuzzyMode: ModeShape = {
: undefined
progress += chunk.length + 1
return (
<span key={chunk} className={cx({ prefix: index + 1 !== chunks.length })}>
<span key={index} className={cx({ prefix: index + 1 !== chunks.length })}>
<Highlight match={regexp} text={index + 1 === chunks.length ? chunk : chunk + '/'} />
</span>
)