Skip to content

Commit

Permalink
Merge pull request #20 from westlinkin/master
Browse files Browse the repository at this point in the history
fix error when number is a double type, TYPE_INT64 will occur, change…
  • Loading branch information
alexiglesias93 authored Oct 25, 2023
2 parents 5be6e99 + 9d619ba commit a371478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-planes-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fireworkers': patch
---

- fix: process numbers as `double` instead of `integer`.
2 changes: 1 addition & 1 deletion src/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const convert_field_to_value = (field_value: unknown): Firestore.Value => {
// Primitives
if (is(field_value, timestamp_schema)) return { timestampValue: field_value };
if (is(field_value, boolean_schema)) return { booleanValue: field_value };
if (is(field_value, number_schema)) return { integerValue: field_value };
if (is(field_value, number_schema)) return { doubleValue: field_value };
if (is(field_value, string_schema)) return { stringValue: field_value };
return { nullValue: 'NULL_VALUE' };
};
Expand Down

0 comments on commit a371478

Please sign in to comment.