From 76a2a30dd77c70893fbcfcd6eb50b39e695f7b61 Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Fri, 8 Sep 2017 10:19:25 -0700 Subject: [PATCH] Don't load cls-q browser-side (#949) This is only necessary on the server. Don't pull into browser bundles. --- packages/react-server/core/util/RequestLocalStorage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-server/core/util/RequestLocalStorage.js b/packages/react-server/core/util/RequestLocalStorage.js index 6bdadd17b..251f1d2b0 100644 --- a/packages/react-server/core/util/RequestLocalStorage.js +++ b/packages/react-server/core/util/RequestLocalStorage.js @@ -1,5 +1,7 @@ var RequestLocalStorage = require('request-local-storage'); -RequestLocalStorage.patch(require('cls-q')); +if (SERVER_SIDE) { + RequestLocalStorage.patch(require('cls-q')); +} module.exports = RequestLocalStorage;