refactor remove useless return statements

This commit is contained in:
quenousimporte 2024-02-16 11:25:37 +01:00
parent 77ddc4907f
commit c425725423
1 changed files with 4 additions and 4 deletions

View File

@ -1482,14 +1482,14 @@ function queryremote(params)
xhr.onerror = function() xhr.onerror = function()
{ {
return reject("XMLHttpRequest error"); reject("XMLHttpRequest error");
} }
xhr.onload = function() xhr.onload = function()
{ {
if (xhr.status !== 200) if (xhr.status !== 200)
{ {
return reject("Http status " + xhr.status); reject("Http status " + xhr.status);
} }
else else
{ {
@ -1498,11 +1498,11 @@ function queryremote(params)
{ {
if (decrypted.startsWith("error: ")) if (decrypted.startsWith("error: "))
{ {
return reject(decrypted); reject(decrypted);
} }
else else
{ {
return resolve(decrypted); resolve(decrypted);
} }
}); });
} }