From a9951160f2a1f6fd78c0d56d53bd8c960a279a27 Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Thu, 30 Apr 2020 16:12:12 +0200
Subject: [PATCH] [fix] Fix Math.trunc override, to return an integer instead
 of a string

---
 www/js/platform.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/js/platform.js b/www/js/platform.js
index 45c8216cf..09c6cd1ab 100644
--- a/www/js/platform.js
+++ b/www/js/platform.js
@@ -439,7 +439,7 @@ if (typeof String.prototype.trim !== 'function') {
 if (Math && typeof Math.trunc !== 'function') {
   console.debug("Adding Math.trunc() -> was missing on this platform");
   Math.trunc = function(number) {
-    return (number - 0.5).toFixed();
+    return parseInt((number - 0.5).toFixed());
   };
 }
 
-- 
GitLab