Skip to content

Commit 6c6fb5d

Browse files
zekemattt
andauthored
options are optional in replicate.wait() (#122)
* options are optional in replicate.wait() * Use && instead of ?. --------- Co-authored-by: Mattt <[email protected]>
1 parent 07dbb5b commit 6c6fb5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class Replicate {
271271
// eslint-disable-next-line no-promise-executor-return
272272
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
273273

274-
const interval = options.interval || 500;
274+
const interval = (options && options.interval) || 500;
275275

276276
let updatedPrediction = await this.predictions.get(id);
277277

0 commit comments

Comments
 (0)