You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Dispatcher should be a global too
This commit is contained in:
@@ -24,10 +24,13 @@ class MatrixDispatcher extends flux.Dispatcher {
|
|||||||
setTimeout(super.dispatch.bind(this, payload), 0);
|
setTimeout(super.dispatch.bind(this, payload), 0);
|
||||||
} else {
|
} else {
|
||||||
this.dispatching = true;
|
this.dispatching = true;
|
||||||
super.dispatch.call(this, payload);
|
super.dispatch(payload);
|
||||||
this.dispatching = false;
|
this.dispatching = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = new MatrixDispatcher();
|
if (global.mxDispatcher === undefined) {
|
||||||
|
global.mxDispatcher = new MatrixDispatcher();
|
||||||
|
}
|
||||||
|
module.exports = global.mxDispatcher;
|
||||||
|
|||||||
Reference in New Issue
Block a user