Skip to content

Commit

Permalink
allow input field display of ','
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuevIO committed Aug 19, 2024
1 parent 14dc836 commit ba0930c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/ReverseCalc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ function formatInput(input: string) {
let result: Result = emptyResult;
const recount = computed(() => {
inputSum.value = inputSum.value.replace(',', '.');
result =
combinations.find(o => o.sum <= Number(inputSum.value) + 1 && o.sum >= Number(inputSum.value) - 1) ??
emptyResult;
const tempInput = inputSum.value.replace(',', '.');
result = combinations.find(o => o.sum <= Number(tempInput) + 1 && o.sum >= Number(tempInput) - 1) ?? emptyResult;
return result;
});
Expand Down

0 comments on commit ba0930c

Please sign in to comment.