From 4a04a1129fffd1e128e53ba7886777c8d7b36b55 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 5 Nov 2015 01:02:20 -0500 Subject: populate product view --- StoneIsland/www/js/vendor/view/router.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'StoneIsland/www/js/vendor/view/router.js') diff --git a/StoneIsland/www/js/vendor/view/router.js b/StoneIsland/www/js/vendor/view/router.js index d766880f..a8ec331f 100644 --- a/StoneIsland/www/js/vendor/view/router.js +++ b/StoneIsland/www/js/vendor/view/router.js @@ -14,8 +14,10 @@ var Router = View.extend({ }, parseRoute: function(pathname){ - - if (pathname[0] !== "/" && pathname[0] !== "#") { pathname = "/" + pathname } + + pathname = pathname.replace(/^#/, "") + + if (pathname[0] !== "/") { pathname = "/" + pathname } var routes = this.routes, path = pathname.split("/"); @@ -25,7 +27,7 @@ var Router = View.extend({ path[i] = null } } - + if (pathname in routes) { this[this.routes[pathname]]() return -- cgit v1.2.3-70-g09d2