fix: init a empty ErrorPages if nil

This commit is contained in:
Derrick Hammer 2024-03-03 05:22:13 -05:00
parent 9fbb0bb859
commit dce94a4bfc
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,10 @@ func (wm *WebAppMetadata) EncodeMsgpack(enc *msgpack.Encoder) error {
items := make([]interface{}, 5)
if wm.ErrorPages == nil {
wm.ErrorPages = make(WebAppErrorPages)
}
items[0] = wm.Name
items[1] = wm.TryFiles
items[2] = wm.ErrorPages