Skip to content

Commit

Permalink
Always reset ROUTE_MAP
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Stasikowski and Simon Adcock committed Jul 21, 2015
1 parent f514e11 commit f004806
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/middleware/route-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ var setup = function(options, cb) {
};

module.exports = function(options, cb) {
if (ROUTE_MAP) {
cb(null, ROUTE_MAP);
}
else {
ROUTE_MAP = {};
setup(options, function(err) {
cb(err, ROUTE_MAP);
});
}
ROUTE_MAP = {};
setup(options, function(err) {
cb(err, ROUTE_MAP);
});
};

0 comments on commit f004806

Please sign in to comment.