Skip to content
Snippets Groups Projects
Commit 3792d549 authored by David Baker's avatar David Baker
Browse files

Dispatcher should be a global too

parent 3be50e32
No related branches found
No related tags found
No related merge requests found
......@@ -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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment