Browse files

Merge pull request #18 from yonran/forgiving-route

Draw topnav even when the user navigates to #css or #css/.
  • Loading branch information...
2 parents aeb0815 + 0851fef commit d689a08d4527fa13ce9385b34a2eaaa349da7f9b @rgarcia committed Apr 5, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 static/js/router.js
View
4 static/js/router.js
@@ -131,7 +131,9 @@ define([
}
};
_.bindAll(cb, 'fn');
- this.route(languageName + '/:query', languageName, cb.fn);
+ // match #languageName/:query or #languageName/ or just #languageName
+ this.route(new RegExp("^" + languageName + '(?:/([^/])?)?$'),
+ languageName, cb.fn);
}
},

0 comments on commit d689a08

Please sign in to comment.