1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-26 03:20:08 +02:00

fix: duplicated findStaticChild process at findChildWithLabel (#2176)

This commit is contained in:
lkeix 2022-05-28 02:15:58 +09:00 committed by GitHub
parent b0453b98e0
commit 0644cd6ecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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