From d73e5cad5b6167c9c2f92c8a16afb2e9bbd5e08d Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sat, 15 May 2021 00:51:22 +0200 Subject: [PATCH] Update TopPanel.js --- src/editor/panels/TopPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/panels/TopPanel.js b/src/editor/panels/TopPanel.js index ac7f5e6f..625c9ea3 100644 --- a/src/editor/panels/TopPanel.js +++ b/src/editor/panels/TopPanel.js @@ -553,10 +553,10 @@ class TopPanel { attrChanger(e) { const attr = e.target.getAttribute("data-attr"); let val = e.target.value; - const valid = isValidUnit(attr, val, this.editor.selectedElement); + const valid = isValidUnit(attr, val, this.selectedElement); if (!valid) { - e.target.value = this.editor.selectedElement().getAttribute(attr); + e.target.value = this.selectedElement.getAttribute(attr); // eslint-disable-next-line no-alert alert(this.i18next.t('notification.invalidAttrValGiven')); return false;