1
0
Fork 0
mirror of synced 2024-06-28 02:50:50 +12:00

Fix for #2250, strings were being parsed for numbers which was causing the issue for strings starting with numbers, using the table schema to determine is parsing necessary.

This commit is contained in:
mike12345567 2021-08-04 14:46:21 +01:00
parent e3361b6944
commit 2fed177f3c
2 changed files with 4 additions and 2 deletions

View file

@ -165,6 +165,10 @@ module External {
if (!row[key] || newRow[key] || field.autocolumn) {
continue
}
// parse floats/numbers
if (field.type === FieldTypes.NUMBER && !isNaN(parseFloat(row[key]))) {
newRow[key] = parseFloat(row[key])
}
// if its not a link then just copy it over
if (field.type !== FieldTypes.LINK) {
newRow[key] = row[key]

View file

@ -19,8 +19,6 @@ function parseBody(body: any) {
}
if (isIsoDateString(value)) {
body[key] = new Date(value)
} else if (!isNaN(parseFloat(value))) {
body[key] = parseFloat(value)
}
}
return body