From d9baf298d5b70a6c0e5d95e3eadb5af3760e12bb Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 4 Jul 2023 01:12:39 +0100 Subject: [PATCH] Update DomHandler.js --- components/lib/utils/DomHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/utils/DomHandler.js b/components/lib/utils/DomHandler.js index 7ba42a774..ed172c018 100755 --- a/components/lib/utils/DomHandler.js +++ b/components/lib/utils/DomHandler.js @@ -185,7 +185,7 @@ export default { setAttributes(element, attributes = {}) { if (element) { const computedStyles = (rule, value) => { - const styles = element?.$attr?.[rule] ? [element?.$attr?.[rule]] : []; + const styles = element?.$attrs?.[rule] ? [element?.$attrs?.[rule]] : []; return [value].flat().reduce((cv, v) => { if (v !== null && v !== undefined) { @@ -216,7 +216,7 @@ export default { this.setAttributes(element, value); } else { value = key === 'class' ? [...new Set(computedStyles('class', value))].join(' ').trim() : key === 'style' ? computedStyles('style', value).join(';').trim() : value; - (element.$attr = element.$attr || {}) && (element.$attr[key] = value); + (element.$attrs = element.$attrs || {}) && (element.$attrs[key] = value); element.setAttribute(key, value); } }