Skip to content

Commit

Permalink
[browser] Avoid double slashes when initializing the router's currnet…
Browse files Browse the repository at this point in the history
… route
  • Loading branch information
frekw committed Dec 9, 2013
1 parent feeeaad commit 1634d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/director/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Router.prototype.init = function (r) {
if (dlocHashEmpty() && r) {
dloc.hash = r;
} else if (!dlocHashEmpty()) {
self.dispatch('on', '/' + dloc.hash.replace(/^#/, ''));
self.dispatch('on', '/' + dloc.hash.replace(/^(#\/|#|\/)/, ''));
}
}
else {
Expand Down

0 comments on commit 1634d52

Please sign in to comment.