diff --git a/src/UnknownDeviceErrorHandler.js b/src/UnknownDeviceErrorHandler.js index c5a3870f40..88f4f57fe4 100644 --- a/src/UnknownDeviceErrorHandler.js +++ b/src/UnknownDeviceErrorHandler.js @@ -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; + } +} diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 49b700df01..eb5447b822 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -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',