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:
Kristiyan Kostadinov
2017-04-11 08:58:24 -07:00
committed by Jeremy Elbourn
parent 857c2171ce
commit a65d2f4c0f
+1 -1
View File
@@ -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');