Skip to content

Commit

Permalink
fix(intg): use entry in % evaluation
Browse files Browse the repository at this point in the history
Since `entry` is now the evaluated value, use it instead
  • Loading branch information
lemredd committed Jan 3, 2023
1 parent 926eaa8 commit 911d8ce
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 @@ -54,7 +54,7 @@ const expressionToDisplay = computed(() => {
}
case "%": {
if (!hasPreviousEntry.value) value = entry.value
else value = `${previousEntry.value} ${operation.value} ${solvePercentage(Number(entry.value), previousEntry.value as number)}`
else value = `${previousEntry.value} ${operation.value} ${entry.value}`
break
}
case "1/x": {
Expand Down

0 comments on commit 911d8ce

Please sign in to comment.