]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid using empty blocks 2341/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 13:55:48 +0000 (16:55 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 13:55:48 +0000 (16:55 +0300)
.eslintrc.json
interface/js/app/stats.js

index 5181105f694b500d5ebb1c5a4abd09f875224397..3e52ed7f89821963fa90dc1d99abd74dff9be3d3 100644 (file)
@@ -67,7 +67,6 @@
         "max-statements-per-line": "off",
         "new-cap": "off",
         "no-else-return": "off",
-        "no-empty": "off",
         "no-inline-comments": "off",
         "no-invalid-this": "off",
         "no-negated-condition": "off",
index 56f3e7101df988645b04572b1a858e36c279b939..65e6f27720e784f93b1156ac22f92da54261a71a 100644 (file)
@@ -67,9 +67,8 @@ define(["jquery", "d3pie", "humanize"],
 
             $.each(data, function (i, item) {
                 var widget = "";
-                if (i === "auth") {}
-                else if (i === "error") {}
-                else if (i === "version") {
+                if (i === "auth" || i === "error") { return true; } // Skip to the next iteration
+                if (i === "version") {
                     widget = "<div class=\"left\"><strong>" + item + "</strong>" +
                     i + "</div>";
                     $(widget).appendTo(widgets);