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/11651

Vanessa354b1210d473
diff --git a/app/src/protyle/render/av/addToDatabase.ts b/app/src/protyle/render/av/addToDatabase.ts
index f6b5b2eef5..3254f7244d 100644
--- a/app/src/protyle/render/av/addToDatabase.ts
+++ b/app/src/protyle/render/av/addToDatabase.ts
@@ -34,7 +34,7 @@ export const addFilesToDatabase = (fileLiElements: Element[]) => {
};
export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: string) => {
- if (protyle.title?.editElement.contains(range.startContainer) || type === "title") {
+ if (protyle.title?.editElement?.contains(range.startContainer) || type === "title") {
openSearchAV("", protyle.breadcrumb.element, (listItemElement) => {
const avID = listItemElement.dataset.avId;
transaction(protyle, [{