1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

fix: fixes a bug when searching for multiple words in fuzzy popup (#3000)

This commit is contained in:
Amir Raminfar
2024-05-30 16:51:20 -07:00
committed by GitHub
parent 3a30c27c9a
commit da62adadc5

View File

@@ -185,6 +185,7 @@ function matchedName({ item, matches = [] }: FuseResult<Item>) {
const result = [];
let lastIndex = 0;
for (const [start, end] of indices) {
if (lastIndex > start) continue;
result.push(item.name.slice(lastIndex, start));
result.push(`<mark>${item.name.slice(start, end + 1)}</mark>`);
lastIndex = end + 1;