mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Resolve #1185
This commit is contained in:
parent
5cce4713a3
commit
2a45142644
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue