From fac354c23c2341a4f65890d9e192dfafa9f8b443 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 27 Jan 2024 10:52:19 +0800 Subject: [PATCH] :art: Improve getRefText https://github.com/siyuan-note/siyuan/issues/10259 --- kernel/api/block.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/api/block.go b/kernel/api/block.go index e6d32b2a3..4e9d3d050 100644 --- a/kernel/api/block.go +++ b/kernel/api/block.go @@ -318,7 +318,12 @@ func getRefText(c *gin.Context) { id := arg["id"].(string) model.WaitForWritingFiles() - ret.Data = model.GetBlockRefText(id) + refText := model.GetBlockRefText(id) + if "" == refText { + // 空块返回 id https://github.com/siyuan-note/siyuan/issues/10259 + refText = id + } + ret.Data = refText } func getRefIDs(c *gin.Context) {