From 2048b2bb7046c05035e8dd33ab08ff4b71752906 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Tue, 29 Jun 2021 19:30:57 +0100 Subject: [PATCH] Update hacks.ts --- state/hacks.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/state/hacks.ts b/state/hacks.ts index 3dca10478..842866aed 100644 --- a/state/hacks.ts +++ b/state/hacks.ts @@ -26,12 +26,11 @@ export function fastDrawUpdate(info: PointerInfo): void { const selectedId = setToArray(tld.getSelectedIds(data))[0] - const shape = data.document.pages[data.currentPageId].shapes[ - selectedId - ] as DrawShape + const { shapes } = data.document.pages[data.currentPageId] - ;(data.document.pages[data.currentPageId].shapes[selectedId] as DrawShape) = - deepClone(shape) + const shape = shapes[selectedId] as DrawShape + + shapes[selectedId] = deepClone(shape) state.forceData(freeze(data)) }