Skip to content

Commit

Permalink
fix: reverse check for path on context
Browse files Browse the repository at this point in the history
  • Loading branch information
Guria committed May 4, 2016
1 parent 5d2d929 commit 37eeb03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function Router (routesConfig, options) {
}

var getRouterServices = function (context) {
var modulePath = context.modules ? context.modules[MODULE].path : context[MODULE].path
var modulePath = context[MODULE] ? context[MODULE].path : context.modules[MODULE].path
return modulePath.reduce(function (services, key) {
return services[key]
}, context.services)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"pretest": "standard",
"test": "nodeunit tests && npm i cerebral@^0.34.0-rc.4 && nodeunit tests",
"test": "nodeunit tests && npm i cerebral@^0.34.0-rc.5 && nodeunit tests",
"posttest": "npm i",
"coverage": "nyc --reporter=lcov --reporter=text npm run test",
"postcoverage": "cat ./coverage/lcov.info | coveralls",
Expand Down

0 comments on commit 37eeb03

Please sign in to comment.