Skip to content

Commit

Permalink
chore: add own property check
Browse files Browse the repository at this point in the history
  • Loading branch information
pskelin committed Apr 24, 2024
1 parent 162bd38 commit cf54f4a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/base/src/UI5Element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ abstract class UI5Element extends HTMLElement {
}
}

if (DEV_MODE) {
const props = (this.constructor as typeof UI5Element).getMetadata().getProperties();
for (const [prop, propData] of Object.entries(props)) { // eslint-disable-line
if (Object.hasOwn(this, prop)) {
// eslint-disable-next-line no-console
console.error("hasOwn", this, prop);
}
}
}

const ctor = this.constructor as typeof UI5Element;

this.setAttribute(ctor.getMetadata().getPureTag(), "");
Expand Down

0 comments on commit cf54f4a

Please sign in to comment.