Skip to content

Commit

Permalink
Changed parseInt to parseFloat
Browse files Browse the repository at this point in the history
  • Loading branch information
jguthrie100 committed Aug 3, 2018
1 parent 8df5d48 commit c1bdcf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ui/fields/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function uiFieldText(field, context) {

// parse as a number
function parsed(val) {
return parseInt(val || 0, 10) || 0;
return parseFloat(val || 0, 10) || 0;

This comment has been minimized.

Copy link
@tyrasd

tyrasd Nov 12, 2021

Member

Hey. I just stumbled over this line while working on #8769 (comment).

FYI: parseFloat doesn't need and accept a radix, see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/parseFloat

Have a great day!

}

// clamp number to min/max
Expand Down

0 comments on commit c1bdcf2

Please sign in to comment.