mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(compatibility): error in theme check with angular universal (#3872)
Fixes a reference error being thrown by the theme check when using server-side rendering. Fixes #3870.
This commit is contained in:
committed by
Jeremy Elbourn
parent
857c2171ce
commit
a65d2f4c0f
@@ -190,7 +190,7 @@ export class CompatibilityModule {
|
||||
}
|
||||
|
||||
private _checkTheme(): void {
|
||||
if (this._document) {
|
||||
if (this._document && typeof getComputedStyle === 'function') {
|
||||
const testElement = this._document.createElement('div');
|
||||
|
||||
testElement.classList.add('mat-theme-loaded-marker');
|
||||
|
||||
Reference in New Issue
Block a user