mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-25 14:10:42 -05:00
fix: add trim to appendNumber
This commit is contained in:
parent
a3fe4d397a
commit
c95b6039ba
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ const ops = {
|
|||
display.textContent = "0";
|
||||
},
|
||||
appendNumber: function(num) {
|
||||
if(num === "0" && display.textContent === "0") return
|
||||
if(num === "0" && display.textContent.trim() === "0") return
|
||||
if(!ops.numFlag && ops.checkLength(ops.firstNum)) {
|
||||
ops.firstNum += num;
|
||||
updateDisplay(ops.firstNum);
|
||||
|
|
Loading…
Reference in a new issue