Skip to content

Commit

Permalink
fix(components): sync the change from vuejs/core#9012
Browse files Browse the repository at this point in the history
  • Loading branch information
lejunyang committed Apr 25, 2024
1 parent bcbdaa7 commit a524c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/custom/apiCustomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a524c3d

Please sign in to comment.