Skip to content

Commit 832ab61

Browse files
committed
fix FieldPath in firestore for JS
1 parent 90cca1c commit 832ab61

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ external object firebase {
168168

169169
open class Query {
170170
fun get(options: Any? = definedExternally): Promise<QuerySnapshot>
171-
fun where(field: String, opStr: String, value: Any?): Query
172-
fun where(path: FieldPath, opStr: String, value: Any?): Query
171+
fun where(field: Any, opStr: String, value: Any?): Query
173172
fun onSnapshot(next: (snapshot: QuerySnapshot) -> Unit, error: (error: Error) -> Unit): ()->Unit
174173
}
175174

firebase-firestore/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "0.1.0"
1+
version = "0.1.1"
22

33
plugins {
44
id("com.android.library")

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ actual class DocumentSnapshot(val js: firebase.firestore.DocumentSnapshot) {
322322
actual val exists get() = rethrow { js.exists }
323323
}
324324

325-
actual typealias FieldPath = firebase.firestore.FieldPath
325+
actual typealias FieldPath = Any
326326

327-
actual fun FieldPath(vararg fieldNames: String) = rethrow { FieldPath(fieldNames) }
327+
actual fun FieldPath(vararg fieldNames: String): FieldPath = rethrow { firebase.firestore.FieldPath(fieldNames) }
328328

329329

330330
actual object FieldValue {

0 commit comments

Comments
 (0)