diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts index 35ef50bf2a..a102672ad6 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts +++ b/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() {