From c5973036928fe571c4f76c2aca35746689208913 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 29 Jan 2022 03:02:45 +0300 Subject: [PATCH] skip deleted styles in `order` --- background/style-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background/style-manager.js b/background/style-manager.js index b976ef20..b846ec3d 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -159,7 +159,7 @@ const styleMan = (() => { /** @returns {Promise>}>} */ async getAllOrdered(keys) { if (ready.then) await ready; - const res = mapObj(orderWrap.value, group => group.map(uuid2style)); + const res = mapObj(orderWrap.value, group => group.map(uuid2style).filter(Boolean)); if (res.main.length + res.prio.length < dataMap.size) { for (const {style} of dataMap.values()) { if (!(style.id in order.main) && !(style.id in order.prio)) {