Remove the correct widget listener
This commit is contained in:
parent
b48842e070
commit
1ed2e6dcc1
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue