Fix: search db is broken

This commit is contained in:
eight 2018-10-12 17:34:36 +08:00
parent 831ca07c2d
commit 86ea846a89

View File

@ -45,13 +45,14 @@
}
const results = [];
return styleManager.getAllStyles(styles => {
if (ids) {
const idSet = new Set(ids);
return styles.filter(s => idSet.has(s.id));
}
return styles;
})
return styleManager.getAllStyles()
.then(styles => {
if (ids) {
const idSet = new Set(ids);
return styles.filter(s => idSet.has(s.id));
}
return styles;
})
.then(styles => {
for (const style of styles) {
const id = style.id;