Fix sticker creator cover image selection
This commit is contained in:
parent
2601197888
commit
ca84d637ae
1 changed files with 1 additions and 4 deletions
|
@ -39,9 +39,6 @@ export function MetaStage(): JSX.Element {
|
||||||
|
|
||||||
const onDrop = React.useCallback(
|
const onDrop = React.useCallback(
|
||||||
async ([file]: Array<FileWithPath>) => {
|
async ([file]: Array<FileWithPath>) => {
|
||||||
if (!file.path) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const stickerImage = await processImage(
|
const stickerImage = await processImage(
|
||||||
file as FileWithRequiredPath,
|
file as FileWithRequiredPath,
|
||||||
|
@ -49,7 +46,7 @@ export function MetaStage(): JSX.Element {
|
||||||
);
|
);
|
||||||
dispatch(setCover(stickerImage));
|
dispatch(setCover(stickerImage));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
dispatch(removeImage(file.path));
|
dispatch(removeImage(file.path || file.name));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[dispatch, artType]
|
[dispatch, artType]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue