fix(core): cmdk command highlight (#9390)

fix AF-2032
This commit is contained in:
pengx17
2024-12-27 11:13:51 +00:00
parent 64827f771c
commit 8bceece5b1
@@ -30,11 +30,11 @@ export const HighlightText = ({ text = '', end, start }: HighlightProps) => {
return (
<span className={styles.highlightText}>
{parts.map(part =>
{parts.map((part, index) =>
typeof part === 'string' ? (
<Fragment key={part}>{part}</Fragment>
) : (
<span key={part.h} className={styles.highlightKeyword}>
<span key={part.h + '.' + index} className={styles.highlightKeyword}>
{part.h}
</span>
)