Browse Source

[Minor] Simplify conditional expression

tags/1.7.9
Alexander Moisseev 5 years ago
parent
commit
743dd8b6b1
2 changed files with 1 additions and 6 deletions
  1. 0
    1
      .eslintrc.json
  2. 1
    5
      interface/js/app/symbols.js

+ 0
- 1
.eslintrc.json View 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",

+ 1
- 5
interface/js/app/symbols.js View 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 = [];

Loading…
Cancel
Save