FIX: Ensure method exists before calling

`_perFileData` is not always defined and uploads failed when it is not.
This commit is contained in:
Dan Ungureanu 2022-01-18 13:23:02 +02:00
parent 5c23c6cdab
commit 64b089072a
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84
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());
});
}
},
});