From cfbb5195543d6f6e85afd4e73bed996bb946d243 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 7 Feb 2024 23:31:17 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/10339 --- app/src/protyle/wysiwyg/transaction.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 52556edf4..e8aecd247 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -998,6 +998,9 @@ const updateRef = (protyle: IProtyle, id: string, index = 0) => { let transactionsTimeout: number; export const transaction = (protyle: IProtyle, doOperations: IOperation[], undoOperations?: IOperation[]) => { + if (doOperations.length === 0) { + return; + } if (!protyle) { // 文档书中点开属性->数据库后的变更操作 fetchPost("/api/transactions", {