Fix icon loading (#9289)

This commit is contained in:
Bram Kragten 2021-05-29 04:54:28 +02:00 committed by GitHub
parent 2d5ae78521
commit 0419c1a41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,16 +36,14 @@ export const getIcon = (iconName: string) =>
.then((icon) => resolve_(icon)) .then((icon) => resolve_(icon))
.catch((e) => reject_(e)); .catch((e) => reject_(e));
} }
toRead = [];
}) })
) ).catch((e) => {
.catch((e) => {
// Firefox in private mode doesn't support IDB // Firefox in private mode doesn't support IDB
// Safari sometime doesn't open the DB so we time out // Safari sometime doesn't open the DB so we time out
for (const [, , reject_] of toRead) { for (const [, , reject_] of toRead) {
reject_(e); reject_(e);
} }
})
.finally(() => {
toRead = []; toRead = [];
}); });
}); });