From 5595d240261c2473e2bdfa6190ef2baaaaa0ef40 Mon Sep 17 00:00:00 2001 From: fent <933490+fent@users.noreply.github.com> Date: Tue, 31 Dec 2019 04:45:31 -0500 Subject: [PATCH] fix: avoid stack overflow on child classes that overwrite `TimeQueue#push` --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 4b02791..5830808 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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); });