Skip to content

Commit

Permalink
Restore check for window, tests fail without it.
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Sep 26, 2020
1 parent 35511d0 commit 095bc91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reporters/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ let policy = {
return html;
}
};
if (window.trustedTypes != null) {
if (typeof window !== 'undefined' && window.trustedTypes != null) {
policy = window.trustedTypes.createPolicy('mocha-html-reporter', policy);
}

Expand Down

0 comments on commit 095bc91

Please sign in to comment.