Skip to content

Commit 5a3474a

Browse files
committed
fix: solved 'fatal error: stack overflow' error
1 parent d027e7a commit 5a3474a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

http/module.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ func (m *Module) GetRouter() gonethttproute.RouterWrapper {
8080

8181
// Handler is a function that returns the handler
8282
func (m *Module) Handler() http.Handler {
83-
return m.Handler()
83+
// Check if the router is nil
84+
if m.RouterWrapper == nil {
85+
return nil
86+
}
87+
return m.RouterWrapper.Handler()
8488
}
8589

8690
// GetPath is a function that returns the path

0 commit comments

Comments
 (0)