From 7050e112253193d2837cff79b7f7e77a078f91a7 Mon Sep 17 00:00:00 2001 From: wandji Date: Wed, 18 Oct 2023 12:31:13 +0100 Subject: [PATCH] Fix issue LOG function in formulaJs library [SCI-9556] (#6481) --- vendor/assets/javascripts/formula.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vendor/assets/javascripts/formula.js b/vendor/assets/javascripts/formula.js index ae0b1de73..7279bf5a2 100644 --- a/vendor/assets/javascripts/formula.js +++ b/vendor/assets/javascripts/formula.js @@ -884,11 +884,10 @@ exports.LOG2E = function() { exports.LOG = function(number, base) { number = utils.parseNumber(number); - base = utils.parseNumber(base); + base = (base === undefined) ? 10 : utils.parseNumber(base); if (utils.anyIsError(number, base)) { return error.value; } - base = (base === undefined) ? 10 : base; return Math.log(number) / Math.log(base); };