From 0419c1a41f37ad7a0e28c62d56a0546768a58d33 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Sat, 29 May 2021 04:54:28 +0200 Subject: [PATCH] Fix icon loading (#9289) --- src/data/iconsets.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/data/iconsets.ts b/src/data/iconsets.ts index debfcea7e2..5675184a3d 100644 --- a/src/data/iconsets.ts +++ b/src/data/iconsets.ts @@ -36,18 +36,16 @@ export const getIcon = (iconName: string) => .then((icon) => resolve_(icon)) .catch((e) => reject_(e)); } - }) - ) - .catch((e) => { - // Firefox in private mode doesn't support IDB - // Safari sometime doesn't open the DB so we time out - for (const [, , reject_] of toRead) { - reject_(e); - } - }) - .finally(() => { toRead = []; - }); + }) + ).catch((e) => { + // Firefox in private mode doesn't support IDB + // Safari sometime doesn't open the DB so we time out + for (const [, , reject_] of toRead) { + reject_(e); + } + toRead = []; + }); }); export const findIconChunk = (icon: string): string => {