From 7b80374c36381c0503248ae4bf19bb7f2ffb9f3b Mon Sep 17 00:00:00 2001 From: Henry Heino Date: Tue, 12 Nov 2024 11:06:31 -0800 Subject: [PATCH] fix(editor): Fix help overlay fails to load if a cloned element has an undefined style property --- packages/js-draw/src/util/cloneElementWithStyles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js-draw/src/util/cloneElementWithStyles.ts b/packages/js-draw/src/util/cloneElementWithStyles.ts index 3800c41e8..e2e0ee14f 100644 --- a/packages/js-draw/src/util/cloneElementWithStyles.ts +++ b/packages/js-draw/src/util/cloneElementWithStyles.ts @@ -12,7 +12,7 @@ const cloneElementWithStyles = (element: HTMLElement) => { const propertyName = originalComputedStyle.item(index); const propertyValue = originalComputedStyle.getPropertyValue(propertyName); - clonedElement.style.setProperty(propertyName, propertyValue); + clonedElement.style?.setProperty(propertyName, propertyValue); } for (let i = 0; i < originalElement.children.length; i++) {