From 0eaf3f0f8a61752021681dce8f55e9b306acebc5 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 22 Dec 2025 16:52:27 +0800 Subject: [PATCH] :art: Fix https://github.com/siyuan-note/siyuan/issues/16664 Signed-off-by: Daniel <845765@qq.com> --- kernel/api/storage.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/api/storage.go b/kernel/api/storage.go index fa223bc61..1cfe617a8 100644 --- a/kernel/api/storage.go +++ b/kernel/api/storage.go @@ -21,6 +21,7 @@ import ( "github.com/88250/gulu" "github.com/gin-gonic/gin" + "github.com/siyuan-note/logging" "github.com/siyuan-note/siyuan/kernel/model" "github.com/siyuan-note/siyuan/kernel/util" ) @@ -177,6 +178,13 @@ func setLocalStorage(c *gin.Context) { return } + if arg["app"] == nil { + logging.LogErrorf("app is nil in setLocalStorage") + ret.Code = -1 + ret.Msg = "arg [app] is nil" + return + } + app := arg["app"].(string) evt := util.NewCmdResult("setLocalStorage", 0, util.PushModeBroadcastMainExcludeSelfApp) evt.AppId = app