Skip to content

Commit

Permalink
fix: empty group path
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Sep 14, 2023
1 parent 9b0fb2d commit 0e99067
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion group.go
Expand Up @@ -14,9 +14,14 @@ type Group struct {

// NewGroup adds a sub-group to this group.
func (g *Group) NewGroup(path string, opts ...GroupOption) *Group {
path = joinPath(g.path, path)
if path == "/" {
path = ""
}

group := &Group{
router: g.router,
path: joinPath(g.path, path),
path: path,
stack: g.cloneStack(),
}

Expand Down

0 comments on commit 0e99067

Please sign in to comment.