mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 00:07:08 +00:00
fix the wrong variable name 'event' in Emitter.ts
This commit is contained in:
parent
ac856bc82b
commit
46bd7176f6
1 changed files with 3 additions and 3 deletions
|
@ -69,11 +69,11 @@ export class Emitter<EventType extends string = string> extends Tone {
|
|||
if (isUndef(this._events)) {
|
||||
this._events = {};
|
||||
}
|
||||
if (this._events.hasOwnProperty(event)) {
|
||||
if (this._events.hasOwnProperty(eventName)) {
|
||||
if (isUndef(callback)) {
|
||||
this._events[event] = [];
|
||||
this._events[eventName] = [];
|
||||
} else {
|
||||
const eventList = this._events[event];
|
||||
const eventList = this._events[eventName];
|
||||
for (let i = eventList.length - 1; i >= 0; i--) {
|
||||
if (eventList[i] === callback) {
|
||||
eventList.splice(i, 1);
|
||||
|
|
Loading…
Reference in a new issue