From 64c8ce7bb65007504b174c562665048b5e13bc0f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 27 May 2024 16:43:56 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11544 --- app/src/block/popover.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts index 4a4aba6ba..687de31fa 100644 --- a/app/src/block/popover.ts +++ b/app/src/block/popover.ts @@ -47,7 +47,9 @@ export const initBlockPopover = (app: App) => { if (!tip) { const href = aElement.getAttribute("data-href") || ""; // 链接地址强制换行 https://github.com/siyuan-note/siyuan/issues/11539 - tip = `${href.substring(0, Constants.SIZE_TITLE)}`; + if (href) { + tip = `${href.substring(0, Constants.SIZE_TITLE)}`; + } const title = aElement.getAttribute("data-title"); if (tip && isLocalPath(href) && !aElement.classList.contains("b3-tooltips")) { let assetTip = tip;