From 86ea846a89549b683711202799a53536e6e9dec2 Mon Sep 17 00:00:00 2001 From: eight Date: Fri, 12 Oct 2018 17:34:36 +0800 Subject: [PATCH] Fix: search db is broken --- background/search-db.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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;