Merge pull request #1524 from matrix-org/luke/groups-store-true-global

Make GroupStoreCache global for cross-package access
pull/21833/head
David Baker 2017-10-24 11:05:14 +01:00 committed by GitHub
commit f29f627c31
1 changed files with 3 additions and 4 deletions

View File

@ -33,8 +33,7 @@ class GroupStoreCache {
} }
} }
let singletonGroupStoreCache = null; if (global.singletonGroupStoreCache === undefined) {
if (!singletonGroupStoreCache) { global.singletonGroupStoreCache = new GroupStoreCache();
singletonGroupStoreCache = new GroupStoreCache();
} }
module.exports = singletonGroupStoreCache; export default global.singletonGroupStoreCache;