diff --git a/light9/fade/Light9FadeUi.ts b/light9/fade/Light9FadeUi.ts --- a/light9/fade/Light9FadeUi.ts +++ b/light9/fade/Light9FadeUi.ts @@ -91,9 +91,9 @@ export class Light9EffectFader extends L ctx: NamedNode = new NamedNode(showRoot + "/fade"); @property() uri!: NamedNode; @property() column!: string; - @property() effect: NamedNode | null = null; - @property() effectAttr: NamedNode | null = null; - @state() setting: NamedNode | null = null; + @property() effect?: NamedNode; + @property() effectAttr?: NamedNode + @state() setting?: NamedNode; @property() value: number = 0.0; @@ -111,18 +111,18 @@ export class Light9EffectFader extends L if (!graph.contains(this.uri, U("rdf:type"), U(":Fader"))) { // not loaded yet, perhaps this.column = "unset"; - this.effect = null; - this.effectAttr = null; + this.effect = undefined; + this.effectAttr = undefined; return; } this.column = graph.stringValue(this.uri, U(":column")); this.effect = graph.uriValue(this.uri, U(":effect")); this.setting = graph.uriValue(this.uri, U(":setting")); - if (this.setting !== null) { + if (this.setting !== undefined) { try { this.effectAttr = graph.uriValue(this.setting, U(":effectAttr")); } catch (e) { - this.effectAttr = null; + this.effectAttr = undefined; } } } @@ -169,7 +169,7 @@ export class Light9EffectFader extends L return; } const { newValue } = ev.detail; - if (this.setting === null) { + if (this.setting === undefined) { this.setting = this.graph.nextNumberedResource(this.graph.Uri(":fade_set")); this.graph.patchObject(this.uri, this.graph.Uri(":setting"), this.setting, this.ctx); }