Export a global.singletonFlairStore to allow cross-project singleton

pull/21833/head
Luke Barnard 2017-10-19 12:00:03 +01:00
parent 71443e9b94
commit 25d14af616
1 changed files with 3 additions and 4 deletions

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;