Skip to content

Commit

Permalink
fix(intg): save current entry before replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Dec 27, 2022
1 parent 5c7917b commit 30a5975
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/CalculatorContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ function evaluateExpression(evaluationMethod: Evaluations) {
break
}
case "1/x": {
const quotient = 1 / Number(entry.value)
leftEntry.value = Number(entry.value)
const quotient = 1 / leftEntry.value
entry.value = String(quotient)
break
}
Expand Down

0 comments on commit 30a5975

Please sign in to comment.