From 3553bfa2d92c7d208f5a1742586d50aaa3cf352b Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 2 Sep 2022 12:11:47 +0200 Subject: [PATCH] TypeError fCallback not a function --- dev/Remote/AbstractFetch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/Remote/AbstractFetch.js b/dev/Remote/AbstractFetch.js index 19046b364..a90f27f8f 100644 --- a/dev/Remote/AbstractFetch.js +++ b/dev/Remote/AbstractFetch.js @@ -162,7 +162,7 @@ export class AbstractFetchRemote } } - fCallback?.( + fCallback && fCallback( iError, data, cached, @@ -173,7 +173,7 @@ export class AbstractFetchRemote ) .catch(err => { console.error({fetchError:err}); - fCallback?.( + fCallback && fCallback( 'TimeoutError' == err.reason ? 3 : (err.name == 'AbortError' ? 2 : 1), err );