You've already forked matrix-react-sdk
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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user