修复缓存条件可能无法保存的Bug

This commit is contained in:
刘祥超
2021-11-04 11:23:29 +08:00
parent 0b73041718
commit 7bcde46d49
2 changed files with 4 additions and 0 deletions

View File

@@ -79,6 +79,7 @@ func (this *IndexAction) RunPost(params struct {
this.ErrorPage(err) this.ErrorPage(err)
return return
} }
err = cacheConfig.Init() err = cacheConfig.Init()
if err != nil { if err != nil {
this.Fail("检查配置失败:" + err.Error()) this.Fail("检查配置失败:" + err.Error())

View File

@@ -12,6 +12,9 @@ Vue.component("http-cache-config-box", {
purgeKey: "" purgeKey: ""
} }
} }
if (cacheConfig.cacheRefs == null) {
cacheConfig.cacheRefs = []
}
return { return {
cacheConfig: cacheConfig cacheConfig: cacheConfig
} }