1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-04 11:51:45 +03:00

Remove the correct widget listener

This commit is contained in:
Travis Ralston
2019-03-20 15:03:02 -06:00
committed by GitHub
parent b48842e070
commit 1ed2e6dcc1

View File

@@ -70,8 +70,8 @@ export default class FromWidgetPostMessageApi {
removeListener(action, callbackFn) {
if (!this.widgetListeners[action]) return;
const idx = this.widgetListeners.indexOf(callbackFn);
if (idx !== -1) this.widgetListeners.splice(idx, 1);
const idx = this.widgetListeners[action].indexOf(callbackFn);
if (idx !== -1) this.widgetListeners[action].splice(idx, 1);
}
/**