Open nrbrook opened 9 years ago
Temp fix:
this.router = new Router();
var oldGetFragment = this.router.history.getFragment;
this.router.history.getFragment = function (fragment) {
if(fragment) {
var root = this.root.slice(1);
if (!fragment.indexOf(root)) fragment = fragment.slice(root.length);
}
return oldGetFragment.call(this, fragment);
};
Just ran into the same problem, thanks @nrbrook, it would be a valuable fix in ampersand-history!
I got same bug today, @nrbrook thanks for temp solution
When a non-empty root is set during router start, routing of clicked anchors fails.
This happens because the anchor pathname is used, which includes the root, which is passed to navigate, which passes that to getFragment, which fails to remove the root from the fragment.