mirror of https://github.com/iconify/api.git
fix: bug when multiple branches of split data tree point to same item
This commit is contained in:
parent
a67e37fec1
commit
b137290974
|
|
@ -115,7 +115,7 @@ export function searchSplitRecordsTreeForSet<T>(tree: SplitDataTree<T>, keywords
|
|||
function search(tree: SplitDataTree<T>, keywords: string[]) {
|
||||
if (!tree.split) {
|
||||
// Not split
|
||||
map.set(tree.match, keywords);
|
||||
map.set(tree.match, keywords.concat(map.get(tree.match) || []));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ export function searchSplitRecordsTreeForSet<T>(tree: SplitDataTree<T>, keywords
|
|||
search(tree.next, next);
|
||||
}
|
||||
if (matches.length) {
|
||||
map.set(tree.match, matches);
|
||||
map.set(tree.match, matches.concat(map.get(tree.match) || []));
|
||||
}
|
||||
}
|
||||
search(tree, keywords);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue