Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use ES6 export style
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Barnard committed Mar 1, 2017
1 parent 7221900 commit 3942783
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions src/UnknownDeviceErrorHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/components/structures/MatrixChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 3942783

Please sign in to comment.