[firestore] fix issue with NaN serialization

This commit is contained in:
Salakar 2018-02-23 02:59:39 +00:00
parent 609324e292
commit 5fb1ad6781
1 changed files with 1 additions and 1 deletions

View File

@ -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,