Permalink
Browse files

Join the * onto the namespace manually to support home routes which d…

…on't end in '/'


e.g. app.namespace('/user', middleware, function(){});

middleware should now be called for '/user' as well as '/user/'.
  • Loading branch information...
1 parent 05e41aa commit 5c76ef6c49a4567ac203346502192c4b17c65191 @ForbesLindesay ForbesLindesay committed Apr 12, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 index.js
View
@@ -28,12 +28,8 @@ exports.namespace = function(){
, path = args.shift()
, fn = args.pop()
, self = this;
+ self.all(path + '*', args);
(this._ns = this._ns || []).push(path);
-
- if(args.length){
- self.all('/*', args);
- }
-
fn.call(this);
this._ns.pop();
return this;

0 comments on commit 5c76ef6

Please sign in to comment.