Fix handling of invalid files

When we don't await on _onInvalidFileError, then it result i the following  NPE  error:

> NoSuchMethodError: The getter 'sourceFile' was called on null.
This commit is contained in:
Neeraj Gupta 2021-08-22 10:19:45 +05:30
parent 1fe20b579d
commit 55890f5396

View file

@ -278,7 +278,7 @@ class FileUploader {
mediaUploadData = await getUploadDataFromEnteFile(file);
} catch (e) {
if (e is InvalidFileError) {
_onInvalidFileError(file);
await _onInvalidFileError(file);
} else {
rethrow;
}