From abb20def4ba71b6c54c46cf681fd708f91788c4c Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 26 Nov 2021 18:27:29 +0100 Subject: [PATCH] fix(core): update --- test/elements/test-demoelement.ts | 11 +++++++++++ ts_web/elements/wcc-properties.ts | 3 +++ 2 files changed, 14 insertions(+) diff --git a/test/elements/test-demoelement.ts b/test/elements/test-demoelement.ts index cc8e148..56b0564 100644 --- a/test/elements/test-demoelement.ts +++ b/test/elements/test-demoelement.ts @@ -20,6 +20,17 @@ enum ETestEnum { export class TestDemoelement extends DeesElement { public static demo = () => html`This is a slot text`; + @property() + public notTyped = 'hello'; + + @property({ + type: String, + }) + public typedAndNotInitizalized: string; + + @property() + public notTypedAndNotInitizalized: string; + @property({ type: Boolean, }) diff --git a/ts_web/elements/wcc-properties.ts b/ts_web/elements/wcc-properties.ts index cc4321f..a3547f8 100644 --- a/ts_web/elements/wcc-properties.ts +++ b/ts_web/elements/wcc-properties.ts @@ -255,6 +255,9 @@ export class WccProperties extends LitElement { if (this.selectedItem && (this.selectedItem as any).demo) { console.log(`Got Dees-Element for property evaluation.`); const anonItem: any = this.selectedItem; + if (!anonItem) { + return; + } console.log(anonItem.elementProperties); const wccFrame = await this.dashboardRef.wccFrame; let selectedElement: HTMLElement;