From 354b1210d4738ca3c6456d0567c8eec58401e27a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 5 Jun 2024 23:29:54 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/11651 --- app/src/protyle/render/av/addToDatabase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/render/av/addToDatabase.ts b/app/src/protyle/render/av/addToDatabase.ts index f6b5b2eef..3254f7244 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, [{