From 886b5fdc8cdd127665b30f844fcc93c125dca290 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 6 Jul 2023 11:15:28 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/8688 --- app/src/layout/dock/Backlink.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/layout/dock/Backlink.ts b/app/src/layout/dock/Backlink.ts index d4acd55ce..75814d688 100644 --- a/app/src/layout/dock/Backlink.ts +++ b/app/src/layout/dock/Backlink.ts @@ -419,13 +419,13 @@ export class Backlink extends Model { if (svgElement.classList.contains("b3-list-item__arrow--open")) { svgElement.classList.remove("b3-list-item__arrow--open"); this.editors.find((item, index) => { - if (item.protyle.block.rootID === docId) { + if (item.protyle.block.rootID === docId && liElement.nextElementSibling && item.protyle.element.isSameNode(liElement.nextElementSibling)) { item.destroy(); this.editors.splice(index, 1); + liElement.nextElementSibling.remove(); return true; } }); - liElement.nextElementSibling?.remove(); svgElement.removeAttribute("disabled"); } else { fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", {