Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 294ae55

Browse files
committed
added a fallback default to stop flow complaining
1 parent 3a25d18 commit 294ae55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mixins/duration.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export default class Duration {
4747
async sleep (ms: number) { return new Promise(resolve => setTimeout(resolve, ms)) }
4848

4949
async wait () {
50-
let resolved = await this.sleep(this.parse(this.cmd.flags.duration))
50+
let ms = this.parse(this.cmd.flags.duration) || 5000
51+
let resolved = await this.sleep(ms)
5152
console.log('operation did not complete in provided duration')
5253
return resolved
5354
}

0 commit comments

Comments
 (0)