From 30cfa956f6341bf4bf824ce925e9e9b3bbc7823b Mon Sep 17 00:00:00 2001 From: Qais Wardag Date: Sat, 29 Jul 2023 11:28:32 +0200 Subject: [PATCH] Fix check if element is null --- src/composables/Designer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/composables/Designer.js b/src/composables/Designer.js index 160484c..747784b 100644 --- a/src/composables/Designer.js +++ b/src/composables/Designer.js @@ -59,7 +59,9 @@ class Designer { } #updateStyle(selectedCSS, CSSArray, mutationName) { const currentCSS = CSSArray.find((CSS) => { - return this.getElement.value.classList.contains(CSS); + if (this.getElement.value !== null) { + return this.getElement.value.classList.contains(CSS); + } }); // set to 'none' if undefined