From ca84d637ae0663e32065b6f6de8affaf569080f1 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Fri, 21 Jul 2023 22:01:46 +0200 Subject: [PATCH] Fix sticker creator cover image selection --- sticker-creator/src/routes/art/MetaStage.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sticker-creator/src/routes/art/MetaStage.tsx b/sticker-creator/src/routes/art/MetaStage.tsx index c42d1df58..016011a8a 100644 --- a/sticker-creator/src/routes/art/MetaStage.tsx +++ b/sticker-creator/src/routes/art/MetaStage.tsx @@ -39,9 +39,6 @@ export function MetaStage(): JSX.Element { const onDrop = React.useCallback( async ([file]: Array) => { - if (!file.path) { - return; - } try { const stickerImage = await processImage( file as FileWithRequiredPath, @@ -49,7 +46,7 @@ export function MetaStage(): JSX.Element { ); dispatch(setCover(stickerImage)); } catch (e) { - dispatch(removeImage(file.path)); + dispatch(removeImage(file.path || file.name)); } }, [dispatch, artType]