Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fire 'error' for already-aborted transition #87

Merged
merged 1 commit into from
Apr 4, 2014

Conversation

ef4
Copy link
Collaborator

@ef4 ef4 commented Apr 3, 2014

This closes emberjs/ember.js#4573

@nathanhammond
Copy link
Contributor

👍 And winning the Internet for the hour starting: now.

@machty
Copy link
Contributor

machty commented Apr 4, 2014

I don't feel comfortable merging in such a heavy code change

machty added a commit that referenced this pull request Apr 4, 2014
Don't fire 'error' for already-aborted transition
@machty machty merged commit 3cd741c into tildeio:master Apr 4, 2014
machty added a commit to emberjs/ember.js that referenced this pull request Apr 4, 2014
@ef4 ef4 deleted the aborted-error-state branch April 4, 2014 13:05
@stefanpenner
Copy link
Collaborator

@ef4 this code change may be a hazard, as assertions which fire during this.transitionTo are now dropped, as the transition is marked as aborted.

@rwjblue
Copy link
Collaborator

rwjblue commented Sep 26, 2018

@stefanpenner - Please open an issue with a repro so we have the ability to address, I do not fully understand the scenario you are describing...

model: function() {
return new Promise(function(res, rej){
router.transitionTo('good');
rej();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rwjblue the fact that the resulting syntax error from this line is totally lost is the hazard.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dunno, maybe I'm missing something obvious but I don't see a syntax error here....

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way though, opening an issue with a repro is the best (possibly only?) way to ensure we actually fix it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Router error substate promise rejection results in redirect.
5 participants