diff --git a/packages/vue/src/shared/input/resize.ts b/packages/vue/src/shared/input/resize.ts index 4179c394a..75974fb1a 100644 --- a/packages/vue/src/shared/input/resize.ts +++ b/packages/vue/src/shared/input/resize.ts @@ -228,7 +228,7 @@ function clearResizedRawGeometry(editor: Editor, nodeId: string): void { export function commitResizePreview(dragState: DragResize, editor: Editor) { // See applyResize — reactive drag state must not leak into graph writes. const d = toRaw(dragState) - if (editor.state) editor.state.snapGuides = [] + editor.state.snapGuides = [] const node = editor.graph.getNode(d.nodeId) if (!node) return const finalChanges = snapshotResizeFinal(node) diff --git a/packages/vue/src/shared/input/resize/snap.ts b/packages/vue/src/shared/input/resize/snap.ts index 779a1b5a1..3fc16ca4e 100644 --- a/packages/vue/src/shared/input/resize/snap.ts +++ b/packages/vue/src/shared/input/resize/snap.ts @@ -79,8 +79,8 @@ export function applyResizeSnap( editor: Editor, disableSnapping: boolean ): Rect { - if (disableSnapping || !editor.state) { - if (editor.state) editor.state.snapGuides = [] + if (disableSnapping) { + editor.state.snapGuides = [] return rect }