From 496caa256802bf68b03abd4e04f9e37f43170b16 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 1 Feb 2023 23:31:10 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=B9=E8=BF=9B=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E5=89=AA=E8=97=8F=E6=89=A9=E5=B1=95=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=B8=A6=20`title`=20=E7=9A=84=E5=9B=BE=E7=89=87=20Fix=20https?= =?UTF-8?q?://github.com/siyuan-note/siyuan/issues/7223?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/extension.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/api/extension.go b/kernel/api/extension.go index 9a3d3bd06..c7d0a4810 100644 --- a/kernel/api/extension.go +++ b/kernel/api/extension.go @@ -129,7 +129,10 @@ func extensionCopy(c *gin.Context) { } } else if ast.NodeImage == n.Type { if dest := n.ChildByType(ast.NodeLinkDest); nil != dest { - dest.Tokens = []byte(uploaded[string(dest.Tokens)]) + assetPath := uploaded[string(dest.Tokens)] + if "" != assetPath { + dest.Tokens = []byte(assetPath) + } } } return ast.WalkContinue