From 9f7368da8a6c9ac83b570386975aa8d4121ac997 Mon Sep 17 00:00:00 2001 From: mitchellhamilton Date: Sat, 14 Jul 2018 11:27:03 +1000 Subject: [PATCH] Move some code since it'll only run during ssr so it can be removed in the browser --- next-packages/utils/src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/next-packages/utils/src/index.js b/next-packages/utils/src/index.js index 8bbfd92e7..4c6e6ee77 100644 --- a/next-packages/utils/src/index.js +++ b/next-packages/utils/src/index.js @@ -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] - } } }