mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Dispatcher should be a global too
This commit is contained in:
parent
3be50e327d
commit
3792d5494a
@ -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 New Issue
Block a user