fix: Correct expression display on repeated '=' press
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -583,7 +583,11 @@ function buttonPress(val) {
|
||||
break;
|
||||
case '=':
|
||||
if (prevNumber != null && currNumber != null && operator != null) {
|
||||
prevExpression = "(" + prevExpression + " " + operator + " " + currExpression + ")";
|
||||
let cExpr = currExpression;
|
||||
if (hasPressedEquals && cExpr === "") {
|
||||
cExpr = currNumber.toString();
|
||||
}
|
||||
prevExpression = prevExpression + " " + operator + " " + cExpr;
|
||||
results = doMath(prevNumber, currNumber, operator);
|
||||
prevNumber = results;
|
||||
currExpression = "";
|
||||
|
||||
Reference in New Issue
Block a user