Skip to content

Commit

Permalink
Do not add maxMilliseconds if 0 or undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightNiwrem committed Apr 2, 2024
1 parent e4045f2 commit de88604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ export class ConversationHandle<C extends Context> {
opts?: OtherwiseConfig<C>,
): Promise<C> {
const { otherwise, drop, maxMilliseconds } = toObj(opts);
const ctx = await this.wait({ maxMilliseconds });
const ctx = maxMilliseconds ? await this.wait({ maxMilliseconds }) : await this.wait();
if (!await predicate(ctx)) {
await otherwise?.(ctx);
await this.skip({ drop });
Expand Down

0 comments on commit de88604

Please sign in to comment.