-
Notifications
You must be signed in to change notification settings - Fork 26
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
stateError and stateChangeError events should be combined #62
Comments
Yeah, it's really confusing what the difference between them is, and worse, I don't think the tests do a good job of asserting that they do the things specific to them (why is it a stateError and not a stateChangeError to navigate to a nonexistent state?). A couple things:
|
current abstract-state-router/index.js Line 176 in f598319
stateChangeAttempt listener threw an error. This should probably just be thrown in another tick instead of being emitted as a state-router error.
Same for abstract-state-router/index.js Line 288 in f598319
For abstract-state-router/index.js Line 331 in f598319
evaluateCurrentRoute , the only place I see that could be causing that error would be if prototypalStateHolder.guaranteeAllStatesExist threw, which means that someone tried to navigate to a state that doesn't exist.
Maybe that should just throw straight out as well? It seems like a different kind of "not found" than the traditional one I'd imagine existing, which would be "there was no matching route for the url in the location bar". |
I would expect to be directed to the If there wasn't a hash, I would expect to go to the If I call |
No description provided.
The text was updated successfully, but these errors were encountered: