Skip to content

Commit

Permalink
feat(core): better error stack trace for router components
Browse files Browse the repository at this point in the history
fixes #4250
  • Loading branch information
nolimits4web committed Feb 27, 2024
1 parent ffb5c8c commit d6c60f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/modules/router/async-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function asyncComponent(router, component, resolve, reject) {
})
.catch((err) => {
reject();
throw new Error(err);
throw new Error(err, { cause: err });
});
}
if (component instanceof Promise) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/router/component-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
})
.catch((err) => {
reject(err);
throw new Error(err);
throw new Error(err, { cause: err });
});
}
let cachedComponent;
Expand Down

0 comments on commit d6c60f8

Please sign in to comment.