From 5fb1ad6781a74a330921da5fda5f86683133c8ba Mon Sep 17 00:00:00 2001 From: Salakar Date: Fri, 23 Feb 2018 02:59:39 +0000 Subject: [PATCH] [firestore] fix issue with NaN serialization --- lib/modules/firestore/utils/serialize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/firestore/utils/serialize.js b/lib/modules/firestore/utils/serialize.js index 24b8f0a5..2aacbe7b 100644 --- a/lib/modules/firestore/utils/serialize.js +++ b/lib/modules/firestore/utils/serialize.js @@ -51,7 +51,7 @@ export const buildNativeArray = (array: Object[]): FirestoreTypeMap[] => { export const buildTypeMap = (value: any): FirestoreTypeMap | null => { const type = typeOf(value); - if (value === null || value === undefined) { + if (value === null || value === undefined || Number.isNaN(value)) { return { type: 'null', value: null,