FIX: Ensure method exists before calling (#15632)

`_perFileData` is not always defined and uploads failed when it is not.
This commit is contained in:
Dan Ungureanu 2022-01-18 13:44:02 +02:00 committed by GitHub
parent 235de5dd90
commit eb4ad958c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -133,9 +133,11 @@ export default Mixin.create(UppyS3Multipart, {
return false;
}
Object.values(files).forEach((file) => {
deepMerge(file.meta, this._perFileData());
});
if (this._perFileData) {
Object.values(files).forEach((file) => {
deepMerge(file.meta, this._perFileData());
});
}
},
});