Merge branch 'hotfix/v1.0.1' of https://github.com/ONLYOFFICE/DocSpace into hotfix/v1.0.1
This commit is contained in:
commit
dc677e67d1
@ -76,6 +76,7 @@ const Dropzone = ({ t, setUploadedFile, isDisabled }) => {
|
||||
timer.current = setTimeout(() => {
|
||||
setLoadingFile(true);
|
||||
}, 50);
|
||||
try {
|
||||
const imageBitMap = await createImageBitmap(file);
|
||||
|
||||
const width = imageBitMap.width;
|
||||
@ -107,6 +108,13 @@ const Dropzone = ({ t, setUploadedFile, isDisabled }) => {
|
||||
setLoadingFile(false);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
toastr.error(error);
|
||||
timer.current && clearTimeout(timer.current);
|
||||
if (mount.current) {
|
||||
setLoadingFile(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const { getRootProps, getInputProps } = useDropzone({
|
||||
|
Loading…
Reference in New Issue
Block a user