diff --git a/background/search-db.js b/background/search-db.js index bf907d06..fba5e851 100644 --- a/background/search-db.js +++ b/background/search-db.js @@ -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;