Sticker Creator: New toaster implementation, better error handling

This commit is contained in:
Ken Powers 2020-01-06 21:20:16 -05:00 committed by Scott Nonnenberg
parent 4b3d63c82e
commit f7568810ea
11 changed files with 167 additions and 90 deletions

View file

@ -51,8 +51,13 @@ const InnerGrid = SortableContainer(
actions.initializeStickers(paths);
paths.forEach(path => {
queue.add(async () => {
const webp = await convertToWebp(path);
actions.addWebp(webp);
try {
const webp = await convertToWebp(path);
actions.addWebp(webp);
} catch (e) {
actions.removeSticker(path);
actions.addToast('StickerCreator--Toasts--errorProcessing');
}
});
});
},