commit 62d381f: [WebUI] Remove redundant condition

Alexander Moisseev moiseev at mezonplus.ru
Thu Dec 27 18:28:12 UTC 2018


Author: Alexander Moisseev
Date: 2018-12-21 11:21:14 +0300
URL: https://github.com/rspamd/rspamd/commit/62d381fdf8086660e03e34ae71155d1e73c87410

[WebUI] Remove redundant condition
as "success" function is called only when .status is true

---
 interface/js/app/upload.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js
index 466d5d25e..e7ea56cf6 100644
--- a/interface/js/app/upload.js
+++ b/interface/js/app/upload.js
@@ -52,9 +52,7 @@ define(["jquery"],
                 headers: headers,
                 success: function (json) {
                     cleanTextUpload(source);
-                    if (json[0].status === true) {
-                        rspamd.alertMessage("alert-success", "Data successfully uploaded");
-                    }
+                    rspamd.alertMessage("alert-success", "Data successfully uploaded");
                 }
             });
         }


More information about the Commits mailing list