diff --git a/src/lib/stylesheet.js b/src/lib/stylesheet.js index 38eec882..2781da46 100644 --- a/src/lib/stylesheet.js +++ b/src/lib/stylesheet.js @@ -13,7 +13,7 @@ export default class StyleSheet { constructor({ name = 'stylesheet', optimizeForSpeed = isProd, - isBrowser = typeof window !== 'undefined' + isBrowser = typeof document !== 'undefined' } = {}) { invariant(isString(name), '`name` must be a string') this._name = name diff --git a/src/stylesheet-registry.js b/src/stylesheet-registry.js index d887265d..b3fcdf79 100644 --- a/src/stylesheet-registry.js +++ b/src/stylesheet-registry.js @@ -22,7 +22,7 @@ export class StyleSheetRegistry { constructor({ styleSheet = null, optimizeForSpeed = false, - isBrowser = typeof window !== 'undefined' + isBrowser = typeof document !== 'undefined' } = {}) { this._sheet = styleSheet ||