diff --git a/router.go b/router.go index a1de2d6e3..b5e50d94f 100644 --- a/router.go +++ b/router.go @@ -333,10 +333,8 @@ func (n *node) findStaticChild(l byte) *node { } func (n *node) findChildWithLabel(l byte) *node { - for _, c := range n.staticChildren { - if c.label == l { - return c - } + if c := n.findStaticChild(l); c != nil { + return c } if l == paramLabel { return n.paramChild