Fix: minor
This commit is contained in:
parent
43afa31fa0
commit
d60db9dbef
|
@ -44,16 +44,12 @@
|
|||
icase = words.some(w => w === lower(w));
|
||||
}
|
||||
|
||||
const results = [];
|
||||
return styleManager.getAllStyles()
|
||||
.then(styles => {
|
||||
return styleManager.getAllStyles().then(styles => {
|
||||
if (ids) {
|
||||
const idSet = new Set(ids);
|
||||
return styles.filter(s => idSet.has(s.id));
|
||||
styles = styles.filter(s => idSet.has(s.id));
|
||||
}
|
||||
return styles;
|
||||
})
|
||||
.then(styles => {
|
||||
const results = [];
|
||||
for (const style of styles) {
|
||||
const id = style.id;
|
||||
if (!query || words && !words.length) {
|
||||
|
@ -68,7 +64,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cache.size) debounce(clearCache, 60e3);
|
||||
return results;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user