mirror of
https://github.com/labstack/echo.git
synced 2025-01-28 03:29:35 +02:00
fix: duplicated findStaticChild process at findChildWithLabel (#2176)
This commit is contained in:
parent
b0453b98e0
commit
0644cd6ecd
@ -333,10 +333,8 @@ func (n *node) findStaticChild(l byte) *node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *node) findChildWithLabel(l byte) *node {
|
func (n *node) findChildWithLabel(l byte) *node {
|
||||||
for _, c := range n.staticChildren {
|
if c := n.findStaticChild(l); c != nil {
|
||||||
if c.label == l {
|
return c
|
||||||
return c
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if l == paramLabel {
|
if l == paramLabel {
|
||||||
return n.paramChild
|
return n.paramChild
|
||||||
|
Loading…
x
Reference in New Issue
Block a user