-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[3.18] navigate()
falls through to window.location on no matching route.
#1874
Conversation
Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! 😄 |
} | ||
if (handleFallThrough) { | ||
console.log("FALL THROUGH"); | ||
win.location = url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to ensure we're staying on this domain before assigning to window.location
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pdokas that happens on the line above! Or...wait. Does Y.Error throw an error or just log it?
CLA is valid! |
} | ||
}; | ||
|
||
Y.PjaxBase = PjaxBase; | ||
Y.PjaxBase = PjaxBase; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline police! 🚓
Does this even need to be an option? It seems like sensible default behavior (in fact, if you had asked me, I would have sworn it was already the default). If it does end up remaining an option, then Possible alternate names:
|
@rgrove as I mentioned in the inline comment I just left, I don't think it needs to be an option. (We thought it would be the default as well! Lo and behold it is not.) The attribute name is |
I agree, no need for an option. I think this change will, in the end, reduce the complexity overall. |
To clarify: by "does this even need to be an option?" I mean that it doesn't seem like either the If |
@rgrove we expected that to be the default behavior and were surprised to find that it was not. That said, if there are any YUI consumers out there relying on the current behavior, an attribute would at least give them the option to disable this change in the default. Just pushed an update based on the conversation so far. |
Any thoughts on the latest? |
👍 |
Sorry, been meaning to get back to this (write tests), but end of quarter happened. Still on my radar...somewhere.... |
Getting back to this after a long hiatus... There's a failing test here that I'm not sure how to handle: This test relies on the Specifically, a hash URL that resolves to the current page should cause |
Also, how do I specify the router config from |
navigate()
falls through to window.location on no matching route.navigate()
falls through to window.location on no matching route.
@ericsoco |
Hi @tripp, any news? |
@ericsoco No. I only pulled in your branch this morning. My apologies. I'll post back later tonight. |
Pull request #1937 updates the tests for your fix. |
@ericsoco |
I've cherry-picked your commits into dev-master. |
w00t! We'll look for em in 3.18. Thanks for knocking this out, @tripp. |
🎉 |
I updated the change log at e2cd21b just in case. |
Per previous conversations with @ericf.
If this looks like an acceptable solution, I can add tests.
/cc @pdokas @jeremyruppel