From e0915bc3075c3718088e4e5bcc2d75eef30f2dbc Mon Sep 17 00:00:00 2001 From: Daniel van Noord Date: Sat, 5 Dec 2020 14:10:42 +0100 Subject: [PATCH] Fix CM.Disp.Beautify failing when num=0 --- CookieMonster.js | 2 +- src/Disp.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index 66c9b12..00e9ea1 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -1273,7 +1273,7 @@ CM.Disp.Beautify = function(num, frac, forced) { answer += 'E+' + (timesTenToPowerThree * 3); } } - if (answer == '') { + if (answer === '') { console.log("Could not beautify number with CM.Disp.Beautify"); answer = CM.Backup.Beautify(num, frac); } diff --git a/src/Disp.js b/src/Disp.js index 35e7a12..1898582 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -387,7 +387,7 @@ CM.Disp.Beautify = function(num, frac, forced) { answer += 'E+' + (timesTenToPowerThree * 3); } } - if (answer == '') { + if (answer === '') { console.log("Could not beautify number with CM.Disp.Beautify"); answer = CM.Backup.Beautify(num, frac); }