From 2a451426440c221266a055e59da36f64e39e2733 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 22 Jun 2023 12:42:59 +0200 Subject: [PATCH] Resolve #1185 --- dev/Remote/AbstractFetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/Remote/AbstractFetch.js b/dev/Remote/AbstractFetch.js index 5b36a0f44..afaf78e65 100644 --- a/dev/Remote/AbstractFetch.js +++ b/dev/Remote/AbstractFetch.js @@ -57,7 +57,7 @@ fetchJSON = (action, sUrl, params, timeout, jsonCallback) => { controller.timeoutId = timeout && setTimeout(() => abort(action, 'TimeoutError'), timeout); return rl.fetchJSON(sUrl, {signal: signal}, params).then(data => { abort(action, 0, 1); - return jsonCallback(data); + return jsonCallback ? jsonCallback(data) : Promise.resolve(data); }).catch(err => { clearTimeout(controller.timeoutId); err.aborted = signal.aborted;