From 3dd1bd8eeee65e182ad95296c3e58f8cbf84dd73 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 23 Jun 2025 11:28:00 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15112 --- app/src/protyle/util/editorCommonEvent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 447a3a60c..88709e12b 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -1069,7 +1069,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { // gallery item 内部拖拽 const doOperations: IOperation[] = []; const undoOperations: IOperation[] = []; - const undoPreviousId = blockElement.querySelector(`.av__gallery-item[data-id="${selectedIds[0]}"]`).previousElementSibling.getAttribute("data-id") || ""; + const undoPreviousId = blockElement.querySelector(`.av__gallery-item[data-id="${selectedIds[0]}"]`).previousElementSibling?.getAttribute("data-id") || ""; selectedIds.reverse().forEach(item => { if (previousID !== item && undoPreviousId !== previousID) { doOperations.push({