mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 19:26:04 +03:00
Dispatcher should be a global too
This commit is contained in:
parent
3be50e327d
commit
3792d5494a
1 changed files with 5 additions and 2 deletions
|
@ -24,10 +24,13 @@ class MatrixDispatcher extends flux.Dispatcher {
|
|||
setTimeout(super.dispatch.bind(this, payload), 0);
|
||||
} else {
|
||||
this.dispatching = true;
|
||||
super.dispatch.call(this, payload);
|
||||
super.dispatch(payload);
|
||||
this.dispatching = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = new MatrixDispatcher();
|
||||
if (global.mxDispatcher === undefined) {
|
||||
global.mxDispatcher = new MatrixDispatcher();
|
||||
}
|
||||
module.exports = global.mxDispatcher;
|
||||
|
|
Loading…
Reference in a new issue