Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14797

Vanessae1b747b45abf
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 91eba5ba3f..c228d85c29 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -621,14 +621,15 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
}, 450);
}
});
+ const attrElement = item.querySelector(".protyle-attr")
if (data.new["custom-avs"] && !data.new["av-names"]) {
- nodeAttrHTML += item.lastElementChild.querySelector(".protyle-attr--av")?.outerHTML || "";
+ nodeAttrHTML += attrElement.querySelector(".protyle-attr--av")?.outerHTML || "";
}
- const refElement = item.lastElementChild.querySelector(".protyle-attr--refcount");
+ const refElement = attrElement.querySelector(".protyle-attr--refcount");
if (refElement) {
nodeAttrHTML += refElement.outerHTML;
}
- item.lastElementChild.innerHTML = nodeAttrHTML + Constants.ZWSP;
+ attrElement.innerHTML = nodeAttrHTML + Constants.ZWSP;
});
return;
}