Change crappy parseFloat() to Number()

This commit is contained in:
Thibaut 2022-05-10 15:16:37 +02:00 committed by GitHub
parent e43071fc64
commit b238c6df46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,8 +91,8 @@ function xtos(sdata) {
if (!cellText) {
cellText = "";
type = "z";
} else if (!isNaN(parseFloat(cellText))) {
cellText = parseFloat(cellText);
} else if (!isNaN(Number(cellText))) {
cellText = Number(cellText);
type = "n";
} else if (cellText.toLowerCase() === "true" || cellText.toLowerCase() === "false") {
cellText = Boolean(cellText);