From 4bf044f48452256f0f0c05e8abe058eab356e251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Tue, 29 Aug 2023 15:28:03 +0300 Subject: [PATCH] Fixed #4341 - Domhandler isElement check updates --- components/lib/utils/DomHandler.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/lib/utils/DomHandler.js b/components/lib/utils/DomHandler.js index 81cc71228..8b6df3f7a 100755 --- a/components/lib/utils/DomHandler.js +++ b/components/lib/utils/DomHandler.js @@ -183,13 +183,13 @@ export default { }, setAttribute(element, attribute = '', value) { - if (element && value !== null && value !== undefined) { + if (this.isElement(element) && value !== null && value !== undefined) { element.setAttribute(attribute, value); } }, setAttributes(element, attributes = {}) { - if (element) { + if (this.isElement(element)) { const computedStyles = (rule, value) => { const styles = element?.$attrs?.[rule] ? [element?.$attrs?.[rule]] : []; @@ -231,7 +231,7 @@ export default { }, getAttribute(element, name) { - if (element) { + if (this.isElement(element)) { const value = element.getAttribute(name); if (!isNaN(value)) { @@ -249,7 +249,7 @@ export default { }, isAttributeEquals(element, name, value) { - return element ? this.getAttribute(element, name) === value : false; + return this.isElement(element) ? this.getAttribute(element, name) === value : false; }, isAttributeNotEquals(element, name, value) {