Skip to content

Commit

Permalink
fix(editor): Fix help overlay fails to load if a cloned element has an
Browse files Browse the repository at this point in the history
undefined style property
  • Loading branch information
personalizedrefrigerator committed Nov 12, 2024
1 parent 8a27b66 commit 7b80374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/js-draw/src/util/cloneElementWithStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 7b80374

Please sign in to comment.