aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/app/symbols.js
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-07-15 17:38:27 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-07-15 17:38:27 +0300
commit743dd8b6b129227a6654c13f76a30432a0e04eda (patch)
tree856f2799fb4247a3aa3d78b4b98d81b8051d1a73 /interface/js/app/symbols.js
parentab72e301244e22f10463bfbf744ad95da4f7e9f9 (diff)
downloadrspamd-743dd8b6b129227a6654c13f76a30432a0e04eda.tar.gz
rspamd-743dd8b6b129227a6654c13f76a30432a0e04eda.zip
[Minor] Simplify conditional expression
Diffstat (limited to 'interface/js/app/symbols.js')
-rw-r--r--interface/js/app/symbols.js6
1 files changed, 1 insertions, 5 deletions
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 = [];