Permalink
Browse files

correct problem where second router in the an app.use sequence was be…

…ing setup two times causing an error
  • Loading branch information...
1 parent 05c6ee2 commit 6afb84eb215639ca8bc005d04f39c176f61b3183 @nrstott committed Dec 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/bogart.js
View
@@ -157,9 +157,9 @@ App.prototype.start = function(port, host) {
if (Router.isRouter(descriptor.middleware)) {
descriptor.middleware.nextApp = app;
app = descriptor.middleware;
+ } else {
+ app = descriptor.middleware.apply(descriptor.middleware, descriptor.args.concat([ app ]));
}
-
- app = descriptor.middleware.apply(descriptor.middleware, descriptor.args.concat([ app ]));
});
}

0 comments on commit 6afb84e

Please sign in to comment.