diff --git a/lib/match.js b/lib/match.js index facbe18..f57aefc 100644 --- a/lib/match.js +++ b/lib/match.js @@ -15,7 +15,7 @@ module.exports = function(req) { if (i === stacks.length - 1) { const mounts = this.handlers[s]; if (mounts) { - handlers = mounts[req.method.toLowerCase()] || mounts['all']; + handlers = mounts[req.method.toLowerCase()] || mounts['all'] || []; } else { handlers = []; } diff --git a/package.json b/package.json index 46d18f6..4b6d748 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "restar", - "version": "2.0.6", + "version": "2.0.7", "description": "web library for rest api", "main": "index.js", "directories": {