Export a global.singletonFlairStore to allow cross-project singleton

This commit is contained in:
Luke Barnard 2017-10-19 12:00:03 +01:00
parent 71443e9b94
commit 25d14af616

View file

@ -147,8 +147,7 @@ class FlairStore extends EventEmitter {
}
}
let singletonFlairStore = null;
if (!singletonFlairStore) {
singletonFlairStore = new FlairStore();
if (global.singletonFlairStore === undefined) {
global.singletonFlairStore = new FlairStore();
}
module.exports = singletonFlairStore;
export default global.singletonFlairStore;