You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Remove the correct widget listener
This commit is contained in:
@@ -70,8 +70,8 @@ export default class FromWidgetPostMessageApi {
|
|||||||
removeListener(action, callbackFn) {
|
removeListener(action, callbackFn) {
|
||||||
if (!this.widgetListeners[action]) return;
|
if (!this.widgetListeners[action]) return;
|
||||||
|
|
||||||
const idx = this.widgetListeners.indexOf(callbackFn);
|
const idx = this.widgetListeners[action].indexOf(callbackFn);
|
||||||
if (idx !== -1) this.widgetListeners.splice(idx, 1);
|
if (idx !== -1) this.widgetListeners[action].splice(idx, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user