From c3d44d6c745fce0779aaab2bdc7c36c6a1aeebe1 Mon Sep 17 00:00:00 2001 From: Chris Bianca Date: Fri, 13 Oct 2017 09:05:57 +0100 Subject: [PATCH] [firestore] Correctly handle `undefined` values --- 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 6015848b..3ef0b09a 100644 --- a/lib/modules/firestore/utils/serialize.js +++ b/lib/modules/firestore/utils/serialize.js @@ -40,7 +40,7 @@ const buildNativeArray = (array: Object[]): any[] => { const buildTypeMap = (value: any): any => { const typeMap = {}; const type = typeOf(value); - if (value === null) { + if (value === null || value === undefined) { typeMap.type = 'null'; typeMap.value = null; } else if (value === DELETE_FIELD_VALUE) {