Skip to content

Commit

Permalink
🐛 [Bug-fix]: Wrong handlers execution order in some mount cases #2460
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed May 16, 2023
1 parent 1d91adf commit 8d4a97c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ func Test_App_Mount_RoutePositions(t *testing.T) {
})
methods := subApp2.Group("/subApp2")
methods.Get("/world", func(c *Ctx) error {
return c.SendString(c.Locals("world").(string))
v, ok := c.Locals("world").(string)
if !ok {
panic("unexpected data type")
}
return c.SendString(v)
})
app.Mount("", subApp2)
}
Expand Down

0 comments on commit 8d4a97c

Please sign in to comment.