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

Transition to url without root #95

Merged
merged 1 commit into from
Nov 6, 2017
Merged

Conversation

jevanlingen
Copy link
Contributor

@jevanlingen jevanlingen commented Nov 3, 2017

The ember-href-to translates a route name correctly to an url, even if the app has a rootURL configured in the enviroment.js.

But if a transition is done with an URL, you should not include the root. Otherwise you end up with a

Uncaught Error: Assertion Failed: The URL '{root}/{url}' did not match any routes in your application

error.

If a transition is done with an URL, you should not include the root. Otherwise you end up with 
`Uncaught Error: Assertion Failed: The URL '{root}/{url}' did not match any routes in your application`
error.
@GavinJoyce
Copy link
Contributor

@jevanlingen thanks for this. Do you think you could add a test?

@jevanlingen
Copy link
Contributor Author

To be honest, I don't know how I could change the rootURL programmatically. So I am not so sure how to write a test for this problem...

@jevanlingen
Copy link
Contributor Author

Note: this bug is actually a regression of version 1.15.0. Before using the router service, the handle function updated the URL without the route:

router.handleURL(urlWithoutRoot);
routerMicrolib.updateURL(urlWithoutRoot);

(See changed files for pull #90)

Copy link
Contributor

@GavinJoyce GavinJoyce left a comment

Choose a reason for hiding this comment

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

👍 thanks for the fix and for digging into the root cause

@GavinJoyce GavinJoyce merged commit 36c2fa8 into intercom:master Nov 6, 2017
@GavinJoyce
Copy link
Contributor

v1.15.1 has been published

@jevanlingen jevanlingen deleted the patch-1 branch November 22, 2017 14:02
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.

None yet

2 participants