From 9fc80a5edde30c78702f3f0c68ffdf2449605a95 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 14 Sep 2022 10:25:15 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=8F=8C=E5=87=BB=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8D=E5=AF=B9=20Fix=20https://github.com?= =?UTF-8?q?/siyuan-note/siyuan/issues/5876?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/assets.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/model/assets.go b/kernel/model/assets.go index 076420bc6..491b1b575 100644 --- a/kernel/model/assets.go +++ b/kernel/model/assets.go @@ -58,6 +58,9 @@ func DocImageAssets(rootID string) (ret []string, err error) { if ast.NodeImage == n.Type { linkDest := n.ChildByType(ast.NodeLinkDest) dest := linkDest.Tokens + if 1 > len(dest) { // 双击打开图片不对 https://github.com/siyuan-note/siyuan/issues/5876 + return ast.WalkContinue + } ret = append(ret, gulu.Str.FromBytes(dest)) } return ast.WalkContinue