fix: display from updating consecutive zeros.

ie 000
This commit is contained in:
Mike 2023-10-12 18:08:43 -04:00
parent 93a933af92
commit a3fe4d397a

View file

@ -29,6 +29,7 @@ const ops = {
display.textContent = "0"; display.textContent = "0";
}, },
appendNumber: function(num) { appendNumber: function(num) {
if(num === "0" && display.textContent === "0") return
if(!ops.numFlag && ops.checkLength(ops.firstNum)) { if(!ops.numFlag && ops.checkLength(ops.firstNum)) {
ops.firstNum += num; ops.firstNum += num;
updateDisplay(ops.firstNum); updateDisplay(ops.firstNum);