From 1edde7291c7e3ea6137613cc4d141b89613927ef Mon Sep 17 00:00:00 2001 From: ad1992 Date: Tue, 26 Apr 2022 12:02:50 +0530 Subject: [PATCH] fix specs --- src/actions/actionFinalize.tsx | 6 +----- src/data/restore.ts | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/actions/actionFinalize.tsx b/src/actions/actionFinalize.tsx index 071523de4..1779cbdf3 100644 --- a/src/actions/actionFinalize.tsx +++ b/src/actions/actionFinalize.tsx @@ -151,7 +151,6 @@ export const actionFinalize = register({ } else { activeTool.type = "selection"; } - return { elements: newElements, appState: { @@ -162,10 +161,7 @@ export const actionFinalize = register({ appState.activeTool.type === "freedraw") && multiPointElement ? appState.activeTool - : { - ...appState.activeTool, - activeTool, - }, + : activeTool, draggingElement: null, multiElement: null, editingElement: null, diff --git a/src/data/restore.ts b/src/data/restore.ts index 449c57e29..b0d6027a9 100644 --- a/src/data/restore.ts +++ b/src/data/restore.ts @@ -263,6 +263,7 @@ export const restoreAppState = ( const activeTool: any = { lastActiveToolBeforeEraser: null, locked: nextAppState.activeTool.locked ?? false, + type: "selection", }; if (AllowedExcalidrawActiveTools[nextAppState.activeTool.type]) { if (nextAppState.activeTool.type === "custom") {