mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Use ES6 export style
This commit is contained in:
parent
7221900497
commit
39427839b9
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ var Lifecycle = require('../../Lifecycle');
|
||||
var PageTypes = require('../../PageTypes');
|
||||
|
||||
var createRoom = require("../../createRoom");
|
||||
var UDEHandler = require("../../UnknownDeviceErrorHandler");
|
||||
import * as UDEHandler from '../../UnknownDeviceErrorHandler';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'MatrixChat',
|
||||
|
Loading…
Reference in New Issue
Block a user