diff --git a/src/models/collectors.ts b/src/models/collectors.ts index 0b78518..f665727 100644 --- a/src/models/collectors.ts +++ b/src/models/collectors.ts @@ -142,7 +142,8 @@ export class Collector extends HarmonyEventEmitter { } /** Returns a Promise resolved when Collector ends or a timeout occurs */ - async wait(timeout: number = this.timeout ?? 0): Promise { + async wait(timeout?: number): Promise { + if (timeout === undefined) timeout = this.timeout ?? 0 return await new Promise((resolve, reject) => { // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!timeout)