From 56e3af699c126fe4b24551d2a8db885805ac6204 Mon Sep 17 00:00:00 2001 From: Smig Tech Date: Sat, 14 Oct 2023 07:51:26 -0400 Subject: [PATCH] fix: repaired number ops --- calculator/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator/js/script.js b/calculator/js/script.js index 4898482..3c37b9a 100644 --- a/calculator/js/script.js +++ b/calculator/js/script.js @@ -188,7 +188,7 @@ function negateNumber(){ function percentageNumber() { let percent; - if ((!ops.numFlag || !ops.onSecondNumber) && !ops.result) { + if ((!ops.numFlag || !ops.onSecondNumber)) { percent = Number(ops.firstNum) / 100; ops.firstNum = String(percent); } else if (ops.result !== "" ) {