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,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 => {