Fix event call

This commit is contained in:
Richard Lewis 2018-01-04 18:43:08 +00:00
parent b85efa08ce
commit 32aecd0630

View file

@ -208,7 +208,7 @@ export default class WidgetMessaging extends MatrixPostMessageApi {
startListening() { startListening() {
this.start(); this.start();
if (global.mxWidgetMessagingListenerCount === 0) { if (global.mxWidgetMessagingListenerCount === 0) {
window.addEventListener("message", () => this.onMessage, false); window.addEventListener("message", (evt) => this.onMessage(evt), false);
} }
global.mxWidgetMessagingListenerCount += 1; global.mxWidgetMessagingListenerCount += 1;
} }