Browse Source
Merge pull request #5094 from vvlladd28/bug/leg-light/init-order
[3.3.1] UI: Added check for DOM element existence before calling draw function
pull/5140/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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)) { |
|
|
for (const propName of Object.keys(changes)) { |
|
|
const change = changes[propName]; |
|
|
const change = changes[propName]; |
|
|
if (!change.firstChange && change.currentValue !== change.previousValue) { |
|
|
if (!change.firstChange && change.currentValue !== change.previousValue) { |
|
|
if (propName === 'enabled') { |
|
|
if (propName === 'enabled' && this.circleElement) { |
|
|
this.draw(); |
|
|
this.draw(); |
|
|
} else if (propName === 'size') { |
|
|
} else if (propName === 'size') { |
|
|
this.update(); |
|
|
this.update(); |
|
|
|