diff --git a/packages/excalidraw/actions/actionFinalize.tsx b/packages/excalidraw/actions/actionFinalize.tsx index 89acad6826..247dd44a99 100644 --- a/packages/excalidraw/actions/actionFinalize.tsx +++ b/packages/excalidraw/actions/actionFinalize.tsx @@ -123,7 +123,7 @@ export const actionFinalize = register({ } } - if (isInvisiblySmallElement(element)) { + if (element && isInvisiblySmallElement(element)) { // TODO: #7348 in theory this gets recorded by the store, so the invisible elements could be restored by the undo/redo, which might be not what we would want newElements = newElements.filter((el) => el.id !== element.id); } diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 5ce8ee3762..f963a3f9b9 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -9023,12 +9023,12 @@ class App extends React.Component { const element = this.scene.getElement(linearElementEditor.elementId); if (isBindingElement(element)) { this.actionManager.executeAction(actionFinalize); - // bindOrUnbindLinearElement( - // element, - // startBindingElement, - // endBindingElement, - // this.scene, - // ); + bindOrUnbindLinearElement( + element, + startBindingElement, + endBindingElement, + this.scene, + ); } if (linearElementEditor !== this.state.selectedLinearElement) {