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/15989 拖拽到折叠标题下需展开

Vanessab3dd8791db71
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index ace6486fb0..ca18cff70a 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -148,8 +148,10 @@ const moveToNew = (protyle: IProtyle, sourceElements: Element[], targetElement:
action: "delete",
id: newSourceId,
});
- doOperations.push(...foldData.doOperations);
- undoOperations.push(...foldData.undoOperations);
+ if (foldData) {
+ doOperations.push(...foldData.doOperations);
+ undoOperations.push(...foldData.undoOperations);
+ }
return {
doOperations,
undoOperations,
@@ -255,8 +257,10 @@ const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElemen
doOperations.push(...responseTransaction.data.doOperations);
undoOperations.push(...responseTransaction.data.undoOperations);
}
- doOperations.push(...foldData.doOperations);
- undoOperations.push(...foldData.undoOperations);
+ if (foldData) {
+ doOperations.push(...foldData.doOperations);
+ undoOperations.push(...foldData.undoOperations);
+ }
return {
doOperations,
undoOperations,