Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit 0cab1cc

Browse files
committed
fix: crash when frontend config is not set
Signed-off-by: qwqcode <[email protected]>
1 parent fcf4849 commit 0cab1cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

http/a_resp.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ func GetApiPublicConfDataMap(c echo.Context) Map {
115115
}
116116

117117
frontendConf := config.Instance.Frontend
118+
if frontendConf == nil {
119+
frontendConf = make(map[string]interface{})
120+
}
118121
frontendConf["imgUpload"] = &imgUpload
119122

120123
return Map{

0 commit comments

Comments
 (0)