Skip to content

Commit 1e2554b

Browse files
committed
NumberFormatter: fix for HashLink
1 parent ba5b72b commit 1e2554b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/feathers/formatters/NumberFormatter.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ class NumberFormatter extends Formatter {
354354
return "";
355355
}
356356

357-
if (decimalSeparatorTo == "" || !Math.isNaN(Std.parseFloat(decimalSeparatorTo))) {
357+
// some versions of HL incorrectly parse "." as 0
358+
if (#if hl decimalSeparatorTo != "." && #end (decimalSeparatorTo == "" || !Math.isNaN(Std.parseFloat(decimalSeparatorTo)))) {
358359
error = Formatter.defaultInvalidFormatError;
359360
return "";
360361
}

0 commit comments

Comments
 (0)