Update webawesome-element.ts

This commit is contained in:
Lea Verou
2025-04-11 02:17:59 -05:00
parent bd41693fc5
commit 6dc81f101c

View File

@@ -96,7 +96,6 @@ export default class WebAwesomeElement extends LitElement {
if (Object.keys(this.cssProps).length === 0) {
// First time connected, initialize
// @ts-ignore
this.cssProps = Object.fromEntries(
cssProps.map(property => {
let setVia = this.getSetVia(property);
@@ -216,6 +215,10 @@ export default class WebAwesomeElement extends LitElement {
}
}
/**
* Get how a prop was set
* @param property - The property to check
*/
private getSetVia(property: PropertyKey): 'css' | 'js' | 'attribute' | undefined {
let Self = this.constructor as typeof WebAwesomeElement;
let setVia;