Skip to content

Commit

Permalink
fix: avoid stack overflow on child classes that overwrite `TimeQueue#…
Browse files Browse the repository at this point in the history
…push`
  • Loading branch information
fent committed Dec 31, 2019
1 parent 22cfb9e commit 5595d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class TimeQueue extends EventEmitter {
args.push(undefined);
}
}
this.push(...args, (err: Error | null, results: any) => {
TimeQueue.prototype.push.call(this, ...args, (err: Error | null, results: any) => {
if (err) return reject(err);
resolve(results);
});
Expand Down

0 comments on commit 5595d24

Please sign in to comment.