From d6a695f793e6c9f2f46b2238e6e952066c4da07e Mon Sep 17 00:00:00 2001 From: fermin831 Date: Thu, 19 Apr 2018 19:17:04 +0200 Subject: [PATCH] Modified round decimals to avoid round string values --- pandora_console/include/javascript/pandora.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 1bc39e31e3..8a1965268f 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1554,6 +1554,9 @@ function paint_graph_status(min_w, max_w, min_c, max_c, inverse_w, inverse_c, er } function round_with_decimals (value, multiplier = 1) { + // Return non numeric types without modification + if (typeof(value) !== "number") return value; + if ((value * multiplier) == 0) return 0; if ((value * multiplier) >= 1) { return Math.round(value * multiplier) / multiplier;