Skip to content

Commit 5e746c1

Browse files
committed
fix(components): sync the change from vuejs/core#9012
1 parent 906ee35 commit 5e746c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/components/src/custom/apiCustomElement.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export class VueElement extends BaseClass {
366366
protected _setAttr(key: string) {
367367
// ignore data- and aria- attrs
368368
if (key.startsWith('data-') || key.startsWith('aria-')) return;
369-
let value: any = this.getAttribute(key);
369+
let value: any = this.hasAttribute(key) ? this.getAttribute(key) : undefined;
370370
const camelKey = camelize(key);
371371
if (this._numberProps && this._numberProps[camelKey]) {
372372
value = toNumberIfValid(value);

0 commit comments

Comments
 (0)