diff --git a/packages/components/src/custom/apiCustomElement.ts b/packages/components/src/custom/apiCustomElement.ts index 5323d91a..8c2fc2b1 100644 --- a/packages/components/src/custom/apiCustomElement.ts +++ b/packages/components/src/custom/apiCustomElement.ts @@ -366,7 +366,7 @@ export class VueElement extends BaseClass { protected _setAttr(key: string) { // ignore data- and aria- attrs if (key.startsWith('data-') || key.startsWith('aria-')) return; - let value: any = this.getAttribute(key); + let value: any = this.hasAttribute(key) ? this.getAttribute(key) : undefined; const camelKey = camelize(key); if (this._numberProps && this._numberProps[camelKey]) { value = toNumberIfValid(value);