From 911d8cee11986ae1e36bc53e0c3ca76fe649dd48 Mon Sep 17 00:00:00 2001 From: "Jarlem Red J. de Peralta" Date: Tue, 3 Jan 2023 15:38:38 +0800 Subject: [PATCH] fix(intg): use `entry` in `%` evaluation Since `entry` is now the evaluated value, use it instead --- src/components/CalculatorContainer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CalculatorContainer.vue b/src/components/CalculatorContainer.vue index 33f0c04..295b4bb 100644 --- a/src/components/CalculatorContainer.vue +++ b/src/components/CalculatorContainer.vue @@ -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": {