Skip to content

Commit

Permalink
fix(compatibility): error in theme check with angular universal
Browse files Browse the repository at this point in the history
Fixes a reference error being thrown by the theme check when using server-side rendering.

Fixes angular#3870.
  • Loading branch information
crisbeto committed Apr 1, 2017
1 parent f40296e commit 378e509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/core/compatibility/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 378e509

Please sign in to comment.