Skip to content

Commit

Permalink
Move some code since it'll only run during ssr so it can be removed i…
Browse files Browse the repository at this point in the history
…n the browser
  • Loading branch information
emmatown committed Jul 14, 2018
1 parent a9cd200 commit 9f7368d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions next-packages/utils/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ export const insertStyles = (

if (shouldSerializeToReactTree) {
context.inserted[insertable.name] = rules.join('')
if (context.compat === undefined) {
return context.inserted[insertable.name]
}
} else {
rules.forEach(rule => {
context.sheet.insert(rule)
})
context.inserted[insertable.name] = true
}
if (context.compat === undefined) {
return context.inserted[insertable.name]
}
}
}

Expand Down

0 comments on commit 9f7368d

Please sign in to comment.