From 977a8ae09f935ea58e85f6a74eeb1581dc2eea52 Mon Sep 17 00:00:00 2001 From: plustokens <101132827+plustokens@users.noreply.github.com> Date: Mon, 10 Apr 2023 01:01:44 +0200 Subject: [PATCH] fix: Handle missing fetch implementation --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6cb513f..eaa2f50 100644 --- a/index.js +++ b/index.js @@ -37,7 +37,7 @@ class Replicate { this.userAgent = options.userAgent || `replicate-javascript/${packageJSON.version}`; this.baseUrl = options.baseUrl || 'https://api.replicate.com/v1'; - this.fetch = fetch; + this.fetch = options.fetch || fetch; this.collections = { get: collections.get.bind(this),