You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume that Backbone is started with the following configuration: Backbone.history.start({ pushState: true, hashChange : false})
Also, History options.root is left at default value which is /
Invoking navigate("/index") on router in browser not supporting pushState causes "Page Not Found" error. Browser address bar shows "http://index" without the host.
This is caused by double / passed to window.location.assign when this.options.root and fragment are concatenated.
Possible fix is to use frag which is already a fragment with leading / stripped.
So instead of
// If you've told us that you explicitly don't want fallback hashchange-
// based history, then `navigate` becomes a page refresh.
} else {
window.location.assign(this.options.root + fragment);
}
Use
// If you've told us that you explicitly don't want fallback hashchange-
// based history, then `navigate` becomes a page refresh.
} else {
window.location.assign(this.options.root + frag);
}
The text was updated successfully, but these errors were encountered:
Thanks for the clarification, I was mislead by the frag which gets / stripping treatment and is used for pushState and hashChange cases . When do you plan next stable release with #1205 fix included?
Assume that Backbone is started with the following configuration:
Backbone.history.start({ pushState: true, hashChange : false})
Also, History
options.root
is left at default value which is/
Invoking
navigate("/index")
on router in browser not supporting pushState causes "Page Not Found" error. Browser address bar shows "http://index" without the host.This is caused by double
/
passed towindow.location.assign
whenthis.options.root
andfragment
are concatenated.Possible fix is to use
frag
which is already afragment
with leading/
stripped.So instead of
Use
The text was updated successfully, but these errors were encountered: