From c957dfc6b257b4c1dfbe202e7fbc61bb4dd50231 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 3 Jan 2023 18:19:41 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=9B=BE=E6=A0=87=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/6974?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/model/storage.go b/kernel/model/storage.go index 7e1b427c4..2ca930c96 100644 --- a/kernel/model/storage.go +++ b/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