From 9c255ca66178647140d3a79956642fdb338cca85 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Sat, 2 Mar 2024 17:13:35 +0100 Subject: [PATCH] chore: whitespace #160 --- source/dom/util/set-option-from-attribute.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dom/util/set-option-from-attribute.mjs b/source/dom/util/set-option-from-attribute.mjs index dd717e1ee..5f25721c5 100644 --- a/source/dom/util/set-option-from-attribute.mjs +++ b/source/dom/util/set-option-from-attribute.mjs @@ -49,6 +49,7 @@ function setOptionFromAttribute( mapping = {}, prefix = "data-monster-option-", ) { + if (!(element instanceof HTMLElement)) return options; if (!element.hasAttributes()) return options; @@ -84,4 +85,4 @@ function setOptionFromAttribute( finder.setVia(optionName, value); return options; -} +} -- GitLab