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

Router redirect fix #3014

Merged
merged 2 commits into from
Feb 23, 2015
Merged

Router redirect fix #3014

merged 2 commits into from
Feb 23, 2015

Conversation

w33ble
Copy link
Contributor

@w33ble w33ble commented Feb 12, 2015

I noticed that when loading an app (Discover, Visualize, Dashboard) with an invalid saved object, the controller was still being called, and the $destroy handler was then trying to call undefined.

The issue was that courier.redirectWhenMissing was resolving, and the controller was called before the redirect happened ($location is async).

The solution was the make courier.redirectWhenMissing never resolve, which was accomplished via a new Promise.halt() method. As an aside, this new Promise method should not have the same memory leak issues that all the other uses of unresolved promises have...

@w33ble w33ble added the review label Feb 12, 2015
@rashidkpc rashidkpc modified the milestone: 4.1.0 Feb 13, 2015
rashidkpc added a commit that referenced this pull request Feb 23, 2015
@rashidkpc rashidkpc merged commit fbb6458 into elastic:master Feb 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants