1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-06-24 16:41:47 +03:00

Use ES6 export style

This commit is contained in:
Luke Barnard
2017-03-01 14:33:25 +00:00
parent 7221900497
commit 39427839b9
2 changed files with 11 additions and 12 deletions

View File

@ -19,14 +19,13 @@ const onAction = function(payload) {
let ref = null;
module.exports = {
startListening: function () {
ref = dis.register(onAction);
},
stopListening: function () {
if (ref){
dis.unregister(ref);
ref = null;
}
},
};
export function startListening () {
ref = dis.register(onAction);
}
export function stopListening () {
if (ref) {
dis.unregister(ref);
ref = null;
}
}