Browse Source

UI: Added check for DOM element existence before calling draw function

pull/5094/head
Vladyslav_Prykhodko 5 years ago
parent
commit
314dbed121
  1. 2
      ui-ngx/src/app/shared/components/led-light.component.ts

2
ui-ngx/src/app/shared/components/led-light.component.ts

@ -73,7 +73,7 @@ export class LedLightComponent implements OnInit, AfterViewInit, OnChanges {
for (const propName of Object.keys(changes)) {
const change = changes[propName];
if (!change.firstChange && change.currentValue !== change.previousValue) {
if (propName === 'enabled') {
if (propName === 'enabled' && this.circleElement) {
this.draw();
} else if (propName === 'size') {
this.update();

Loading…
Cancel
Save