fix: removing nonexistent events is ok
This commit is contained in:
parent
2fc0b35eee
commit
e97aef03d1
|
@ -77,12 +77,10 @@ export function EventEmitterMixin(Superclass) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Function.
|
// Function.
|
||||||
const lists = [];
|
if (!(type in this.$$events)) {
|
||||||
if ((type in this.$$events)) {
|
return;
|
||||||
lists.push(this.$$events);
|
|
||||||
}
|
}
|
||||||
const listeners = this.$$events;
|
this.$$events[type] = this.$$events[type].filter((listener) => {
|
||||||
listeners[type] = listeners[type].filter((listener) => {
|
|
||||||
return listener.fn !== fn;
|
return listener.fn !== fn;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user