]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Simplify conditional expression
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 14:38:27 +0000 (17:38 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 14:38:27 +0000 (17:38 +0300)
.eslintrc.json
interface/js/app/symbols.js

index d62daffcfd1c8e6323bdd4e30e0cd7a9f54d5cbd..98c4bbbe66b567cc66d2fc0e72bb5579778f247f 100644 (file)
@@ -66,7 +66,6 @@
         "max-lines-per-function": "off",
         "max-statements-per-line": "off",
         "new-cap": "off",
-        "no-else-return": "off",
         "no-inline-comments": "off",
         "no-invalid-this": "off",
         "no-negated-condition": "off",
index 237a10d6a83cbb9ef032a364d115b503a164c9c5..75234b09e390bbac2d2b478810c9610bcb1d4a85 100644 (file)
@@ -73,11 +73,7 @@ define(["jquery", "footable"],
         }
         function decimalStep(number) {
             var digits = ((Number(number)).toFixed(20)).replace(/^-?\d*\.?|0+$/g, "").length;
-            if (digits === 0 || digits > 4) {
-                return 0.1;
-            } else {
-                return 1.0 / (Math.pow(10, digits));
-            }
+            return (digits === 0 || digits > 4) ? 0.1 : 1.0 / (Math.pow(10, digits));
         }
         function process_symbols_data(data) {
             var items = [];