We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
document
window
1 parent d27335d commit 75a7d45Copy full SHA for 75a7d45
packages/create-emotion/src/index.js
@@ -312,7 +312,7 @@ function createEmotion(
312
caches.registered = {}
313
}
314
315
- if (typeof window !== 'undefined') {
+ if (isBrowser) {
316
let chunks = Array.from(document.querySelectorAll(`[data-emotion-${key}]`))
317
chunks.forEach(node => {
318
// $FlowFixMe
packages/create-emotion/src/utils.js
@@ -71,7 +71,7 @@ export const classnames = (args: Array<ClassNameArg>): string => {
71
return cls
72
73
74
-export const isBrowser = typeof window !== 'undefined'
+export const isBrowser = typeof document !== 'undefined'
75
76
export type PrefixOption =
77
| boolean
0 commit comments