diff --git a/httpr.go b/httpr.go index d36908d..7e2a48d 100644 --- a/httpr.go +++ b/httpr.go @@ -70,12 +70,12 @@ outer: } } - return n.handler, params + return curNode.handler, params } if pathLen > i+1 { var paramNode *node - for _, next := range n.children { + for _, next := range curNode.children { if next.endpoint == path[i+1] { curNode = next continue outer