瀏覽代碼

:bug: 图标全部消失 https://github.com/siyuan-note/siyuan/issues/6974

Liang Ding 2 年之前
父節點
當前提交
c957dfc6b2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/model/storage.go

+ 1 - 1
kernel/model/storage.go

@@ -342,6 +342,7 @@ func setLocalStorage(val interface{}) (err error) {
 }
 
 func getLocalStorage() (ret map[string]interface{}, err error) {
+	ret = map[string]interface{}{}
 	lsPath := filepath.Join(util.DataDir, "storage/local.json")
 	if !gulu.File.IsExist(lsPath) {
 		return
@@ -353,7 +354,6 @@ func getLocalStorage() (ret map[string]interface{}, err error) {
 		return
 	}
 
-	ret = map[string]interface{}{}
 	if err = gulu.JSON.UnmarshalJSON(data, &ret); nil != err {
 		logging.LogErrorf("unmarshal storage [local] failed: %s", err)
 		return