mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Merge branch 'currantlabs-corrupted_group_fix'
This commit is contained in:
commit
d079d36162
6
echo.go
6
echo.go
@ -414,7 +414,11 @@ func serveFile(dir, file string, c *Context) error {
|
||||
func (e *Echo) Group(prefix string, m ...Middleware) *Group {
|
||||
g := &Group{*e}
|
||||
g.echo.prefix += prefix
|
||||
if len(m) > 0 {
|
||||
if len(m) == 0 {
|
||||
mw := make([]MiddlewareFunc, len(g.echo.middleware))
|
||||
copy(mw, g.echo.middleware)
|
||||
g.echo.middleware = mw
|
||||
} else {
|
||||
g.echo.middleware = nil
|
||||
g.Use(m...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user