Skip to content

Commit 700858b

Browse files
committed
PR feedback
1 parent 4a434a5 commit 700858b

File tree

2 files changed

+2
-2
lines changed
  • firebase-firestore/src

2 files changed

+2
-2
lines changed

firebase-firestore/src/androidMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ actual class DocumentSnapshot(val android: com.google.firebase.firestore.Documen
413413

414414
actual fun <T> data(strategy: DeserializationStrategy<T>) = decode(strategy, android.data)
415415

416-
actual fun dataMap(): Map<String, Any?> = android.data ?: mapOf()
416+
actual fun dataMap(): Map<String, Any?> = android.data ?: emptyMap()
417417

418418
actual inline fun <reified T> get(field: String) = decode<T>(value = android.get(field))
419419

firebase-firestore/src/iosMain/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ actual class DocumentSnapshot(val ios: FIRDocumentSnapshot) {
381381

382382
actual fun <T> data(strategy: DeserializationStrategy<T>) = decode(strategy, ios.data())
383383

384-
actual fun dataMap(): Map<String, Any?> = ios.data()?.map { it.key.toString() to it.value }?.toMap() ?: mapOf()
384+
actual fun dataMap(): Map<String, Any?> = ios.data()?.map { it.key.toString() to it.value }?.toMap() ?: emptyMap()
385385

386386
actual inline fun <reified T> get(field: String) = decode<T>(value = ios.valueForField(field))
387387

0 commit comments

Comments
 (0)