From 743dd8b6b129227a6654c13f76a30432a0e04eda Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sun, 15 Jul 2018 17:38:27 +0300 Subject: [PATCH] [Minor] Simplify conditional expression --- .eslintrc.json | 1 - interface/js/app/symbols.js | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d62daffcf..98c4bbbe6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -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", diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index 237a10d6a..75234b09e 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -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 = []; -- 2.39.5