File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
firebase-firestore/src/jsMain/kotlin/dev/gitlive/firebase/firestore Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,9 @@ import dev.gitlive.firebase.externals.FirebaseApp
8
8
import kotlin.js.Json
9
9
import kotlin.js.Promise
10
10
11
+ external fun documentId (): FieldPath
12
+
11
13
external class FieldPath (vararg fieldNames : String ) {
12
- companion object {
13
- val documentId: FieldPath
14
- }
15
14
fun isEqual (other : FieldPath ): Boolean
16
15
17
16
}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import dev.gitlive.firebase.firestore.externals.clearIndexedDbPersistence
15
15
import dev.gitlive.firebase.firestore.externals.connectFirestoreEmulator
16
16
import dev.gitlive.firebase.firestore.externals.deleteDoc
17
17
import dev.gitlive.firebase.firestore.externals.doc
18
+ import dev.gitlive.firebase.firestore.externals.documentId as jsDocumentId
18
19
import dev.gitlive.firebase.firestore.externals.enableIndexedDbPersistence
19
20
import dev.gitlive.firebase.firestore.externals.getDoc
20
21
import dev.gitlive.firebase.firestore.externals.getDocs
@@ -464,10 +465,10 @@ actual class SnapshotMetadata(val js: JsSnapshotMetadata) {
464
465
actual class FieldPath private constructor(val js : JsFieldPath ) {
465
466
466
467
actual companion object {
467
- actual val documentId = FieldPath (JsFieldPath .documentId )
468
+ actual val documentId = FieldPath (jsDocumentId() )
468
469
}
469
470
actual constructor (vararg fieldNames: String ) : this (dev.gitlive.firebase.firestore.rethrow {
470
- js( " Reflect " ).construct( JsFieldPath , fieldNames).unsafeCast< JsFieldPath >( )
471
+ JsFieldPath ( * fieldNames )
471
472
})
472
473
actual val documentId: FieldPath get() = FieldPath .documentId
473
474
actual val encoded: EncodedFieldPath = js
You can’t perform that action at this time.
0 commit comments