Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/16801

Vanessab973fed06be8
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index f045f89cd5..909bc35c9f 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -692,7 +692,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
if (getContenteditableElement(rangeBlockElement)) {
range.insertNode(document.createElement("wbr"));
} else {
- getContenteditableElement(updateElements[0]).insertAdjacentHTML("afterbegin", "<wbr>");
+ getContenteditableElement(updateElements[0])?.insertAdjacentHTML("afterbegin", "<wbr>");
}
}
}