Skip to content

Commit

Permalink
fix(intg): use previousEntry and operation
Browse files Browse the repository at this point in the history
Only if the expression is incomplete
  • Loading branch information
lemredd committed Jan 3, 2023
1 parent 8a9ed2d commit 926eaa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/CalculatorContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const expressionToEvaluate = computed({
}
})
const expressionToDisplay = computed(() => {
let value = Array.from(expressionToEvaluate.value).join(" ")
let value = `${previousEntry.value ? previousEntry.value : ""} ${operation.value ? operation.value : ""}`
switch(evaluation.value) {
case "=": {
Expand Down

0 comments on commit 926eaa8

Please sign in to comment.