From f41d9e7d43c4d48e74f70db61a32c5b438e62ee6 Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Tue, 9 Oct 2018 13:06:24 +0200 Subject: [PATCH] Nested GeoPoint gets saved as object in Firestore on iOS #947 --- CHANGELOG.md | 4 ++++ src/firebase.ios.ts | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0c47c9e..e7d6aaa1 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ [Firebase iOS SDK Changelog](https://firebase.google.com/support/release-notes/ios) [Firebase Android SDK Changelog](https://firebase.google.com/support/release-notes/android) +## 7.1.4 (2018, October 9) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/76?closed=1) + + ## 7.1.3 (2018, October 8) [Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/75?closed=1) diff --git a/src/firebase.ios.ts b/src/firebase.ios.ts index c8dcfdbb..e6ff1673 100755 --- a/src/firebase.ios.ts +++ b/src/firebase.ios.ts @@ -1810,6 +1810,7 @@ function fixSpecialFields(item) { item[k] = fixSpecialField(item[k]); } } + return item; } function fixSpecialField(item): any { @@ -1818,8 +1819,6 @@ function fixSpecialField(item): any { } else if (item instanceof FieldValue) { const fieldValue: FieldValue = item; if (fieldValue.type === "ARRAY_UNION") { - console.log(">> fieldValue.value1: " + fieldValue.value); - console.log(">> fieldValue.value2: " + JSON.stringify(fieldValue.value)); return FIRFieldValue.fieldValueForArrayUnion(fieldValue.value); } else if (fieldValue.type === "ARRAY_REMOVE") { return FIRFieldValue.fieldValueForArrayRemove(fieldValue.value); @@ -1834,6 +1833,8 @@ function fixSpecialField(item): any { }); } else if (isDocumentReference(item)) { return item.ios; + } else if (typeof item === "object") { + return fixSpecialFields(item); } else { return item; }