Skip to content

Commit

Permalink
fix(Google Cloud Firestore Node): Fix empty string interpreted as num…
Browse files Browse the repository at this point in the history
…ber (#7136)
  • Loading branch information
linktohack authored Sep 12, 2023
1 parent b67a6fc commit 915cfa0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function jsonToDocument(value: string | number | IDataObject | IDataObjec
return { booleanValue: value };
} else if (value === null) {
return { nullValue: null };
} else if (!isNaN(value as number)) {
} else if (value !== '' && !isNaN(value as number)) {
if (value.toString().indexOf('.') !== -1) {
return { doubleValue: value };
} else {
Expand Down

0 comments on commit 915cfa0

Please sign in to comment.