Skip to content

Commit

Permalink
minor patch on upload file task
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Jan 25, 2024
1 parent 35e62ff commit 8e9c438
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/services/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,12 @@ export default class FetchService extends Service {
.then((response) => response.json())
.catch((error) => {
this.notifications.serverError(error, 'File upload failed.');
});

if (typeof errorCallback === 'function') {
errorCallback(error);
}
});

if (upload) {
const model = this.store.push(this.store.normalize('file', upload.file));
set(file, 'model', model);
Expand Down

0 comments on commit 8e9c438

Please sign in to comment.