Skip to content

Commit

Permalink
Fix exception in fetch-loader error handler video-dev#2
Browse files Browse the repository at this point in the history
  • Loading branch information
softworkz committed May 24, 2021
1 parent 97670a7 commit e7cfd96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/fetch-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ class FetchLoader implements Loader<LoaderContext> {
// when destroying, 'error' itself can be undefined
const code: number = !error ? 0 : error.code || 0;
const text: string = !error ? null : error.message;
callbacks.onError({ code, text }, context, error.details);
callbacks.onError(
{ code, text },
context,
error ? error.details : null
);
});
}

Expand Down

0 comments on commit e7cfd96

Please sign in to comment.