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 authored and dyakovri committed Aug 26, 2024
1 parent e30c2af commit 6573c18
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 6573c18

Please sign in to comment.