Browse Source

refactor(theme-shared): add snq for type error

pull/2261/head
mehmet-erim 7 years ago
parent
commit
40641a63b4
  1. 4
      npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts

4
npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts

@ -14,6 +14,7 @@ import {
} from '@angular/core';
import { fromEvent, Subject } from 'rxjs';
import { debounceTime, filter } from 'rxjs/operators';
import snq from 'snq';
@Component({
selector: 'abp-http-error-wrapper',
@ -49,7 +50,8 @@ export class HttpErrorWrapperComponent implements AfterViewInit, OnDestroy, OnIn
}
ngOnInit() {
this.backgroundColor = window.getComputedStyle(document.body).getPropertyValue('background-color');
this.backgroundColor =
snq(() => window.getComputedStyle(document.body).getPropertyValue('background-color')) || '#fff';
}
ngAfterViewInit() {

Loading…
Cancel
Save