From c425725423c66b4d6431effa06f19a67e0e6ece8 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 16 Feb 2024 11:25:37 +0100 Subject: [PATCH] refactor remove useless return statements --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 0f057fa..ea719ef 100644 --- a/main.js +++ b/main.js @@ -1482,14 +1482,14 @@ function queryremote(params) xhr.onerror = function() { - return reject("XMLHttpRequest error"); + reject("XMLHttpRequest error"); } xhr.onload = function() { if (xhr.status !== 200) { - return reject("Http status " + xhr.status); + reject("Http status " + xhr.status); } else { @@ -1498,11 +1498,11 @@ function queryremote(params) { if (decrypted.startsWith("error: ")) { - return reject(decrypted); + reject(decrypted); } else { - return resolve(decrypted); + resolve(decrypted); } }); }