Skip to content

Commit

Permalink
Merge pull request #20529 from gitKrystan/error-error
Browse files Browse the repository at this point in the history
Don't rethrow string errors in handleTransitionReject
  • Loading branch information
wagenet authored Aug 23, 2023
2 parents 76e7eba + 6cdb9e4 commit 40ba038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@ember/application/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class ApplicationInstance extends EngineInstance {
};

let handleTransitionReject = (error: any): unknown => {
if (error.error) {
if (error.error && error.error instanceof Error) {
throw error.error;
} else if (error.name === 'TransitionAborted' && router._routerMicrolib.activeTransition) {
return router._routerMicrolib.activeTransition.then(
Expand Down

0 comments on commit 40ba038

Please sign in to comment.