Skip to content

Commit

Permalink
Remove missing control rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
danyill committed Jan 29, 2024
1 parent c495fca commit f6b118d
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions oscd-supervision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,24 +829,12 @@ export default class OscdSupervision extends LitElement {
${this.getSelectedIedSupLNs(true, false).map(lN => {
const cbRef = getSupervisionCBRef(lN);
const controlElement =
getOtherIedControlElements(this.selectedIed, this.controlType).find(
control => cbRef === controlBlockReference(control)
) ?? null;
const controlElement = getOtherIedControlElements(
this.selectedIed,
this.controlType
).find(control => cbRef === controlBlockReference(control))!;
return html`${controlElement
? this.renderControl(controlElement)
: html`<mwc-list-item
noninteractive
graphic="icon"
data-control="${identity(controlElement)}"
value="Control not found"
>
<span>Control not found</span>
<mwc-icon slot="graphic"
>${this.controlType === 'GOOSE' ? gooseIcon : smvIcon}</mwc-icon
>
</mwc-list-item>`}`;
return this.renderControl(controlElement);
})}</mwc-list
>`;
}
Expand Down

0 comments on commit f6b118d

Please sign in to comment.