[firestore] fix issue with NaN serialization
This commit is contained in:
parent
609324e292
commit
5fb1ad6781
|
@ -51,7 +51,7 @@ export const buildNativeArray = (array: Object[]): FirestoreTypeMap[] => {
|
||||||
|
|
||||||
export const buildTypeMap = (value: any): FirestoreTypeMap | null => {
|
export const buildTypeMap = (value: any): FirestoreTypeMap | null => {
|
||||||
const type = typeOf(value);
|
const type = typeOf(value);
|
||||||
if (value === null || value === undefined) {
|
if (value === null || value === undefined || Number.isNaN(value)) {
|
||||||
return {
|
return {
|
||||||
type: 'null',
|
type: 'null',
|
||||||
value: null,
|
value: null,
|
||||||
|
|
Loading…
Reference in New Issue