Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 1a3f442

Browse files
authored
Merge pull request #113 from mikol-styra/mikol-check-for-dom
Check for DOM in CSSPluginBase.prototype.instantiate()
2 parents 7427c63 + d5f6b00 commit 1a3f442

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

css-plugin-base.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ CSSPluginBase.prototype.listAssets = function(loads, opts) {
5858
*/
5959
// NB hot reloading support here
6060
CSSPluginBase.prototype.instantiate = function(load) {
61-
if (this.builder)
62-
return;
61+
if (this.builder || typeof document === 'undefined')
62+
return;
6363

6464
var style = document.createElement('style');
6565
style.type = 'text/css';

0 commit comments

Comments
 (0)