From a3fe4d397a2d95efaaf26352934a5bcbf220990f Mon Sep 17 00:00:00 2001 From: Smig Tech Date: Thu, 12 Oct 2023 18:08:43 -0400 Subject: [PATCH] fix: display from updating consecutive zeros. ie 000 --- calculator/js/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/calculator/js/script.js b/calculator/js/script.js index a9855a8..fe6e4a1 100644 --- a/calculator/js/script.js +++ b/calculator/js/script.js @@ -29,6 +29,7 @@ const ops = { display.textContent = "0"; }, appendNumber: function(num) { + if(num === "0" && display.textContent === "0") return if(!ops.numFlag && ops.checkLength(ops.firstNum)) { ops.firstNum += num; updateDisplay(ops.firstNum);