From 3ae31dd426b0879fcc594eb1bde43c7db3526332 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 24 Oct 2017 10:39:47 +0100 Subject: [PATCH] Make GroupStoreCache global for cross-package access --- src/stores/GroupStoreCache.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/stores/GroupStoreCache.js b/src/stores/GroupStoreCache.js index 551b155615..df5ffcda5e 100644 --- a/src/stores/GroupStoreCache.js +++ b/src/stores/GroupStoreCache.js @@ -33,8 +33,7 @@ class GroupStoreCache { } } -let singletonGroupStoreCache = null; -if (!singletonGroupStoreCache) { - singletonGroupStoreCache = new GroupStoreCache(); +if (global.singletonGroupStoreCache === undefined) { + global.singletonGroupStoreCache = new GroupStoreCache(); } -module.exports = singletonGroupStoreCache; +export default global.singletonGroupStoreCache;