Skip to content

Commit

Permalink
Re-enable opt
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jul 13, 2017
1 parent 33b1f9a commit 58c2075
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ Router.prototype.find = function (method, path) {
i = pathLen < prefixLen ? pathLen : prefixLen
while (len < i && path[len] === prefix[len]) len++

if (len === prefixLen) path = path.slice(len)
if (len === prefixLen) {
path = path.slice(len)
pathLen = path.length
}

node = currentNode.find(path[0])
if (!node) return null
Expand Down

0 comments on commit 58c2075

Please sign in to comment.