From a0be8f0aa306b190b794a48a94d62ef79a7ce914 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 15 Mar 2021 04:13:09 +0100 Subject: [PATCH] Accounting for missing options in http utility timeout function. --- src/utils/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/http.js b/src/utils/http.js index c1439770..32e9a8b4 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -142,7 +142,7 @@ function getTimeout(options, url) { return new Promise((resolve, reject, onCancel) => { const timeoutId = setTimeout(() => { reject(new Error(`URL ${url} timed out`)); - }, (options.timeout || defaultOptions.timeout) + 10000); + }, (options?.timeout || defaultOptions.timeout) + 10000); onCancel(() => clearTimeout(timeoutId)); });