Skip to content

Commit 1aa2f13

Browse files
committed
fix where in / array-contains-any on js
1 parent b2b9416 commit 1aa2f13

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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.2.0"
1+
version = "0.2.1"
22

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

firebase-firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitlive/firebase-firestore",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Wrapper around firebase for usage in Kotlin Multiplatform projects",
55
"main": "firebase-firestore.js",
66
"scripts": {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,14 @@ actual open class Query(open val js: firebase.firestore.Query) {
275275
}
276276

277277
internal actual fun _where(field: String, inArray: List<Any>?, arrayContainsAny: List<Any>?) = Query(
278-
(inArray?.let { js.where(field, "in", it) } ?: js).let { js2 ->
279-
arrayContainsAny?.let { js2.where(field, "array-contains-any", it) } ?: js2
278+
(inArray?.let { js.where(field, "in", it.toTypedArray()) } ?: js).let { js2 ->
279+
arrayContainsAny?.let { js2.where(field, "array-contains-any", it.toTypedArray()) } ?: js2
280280
}
281281
)
282282

283283
internal actual fun _where(path: FieldPath, inArray: List<Any>?, arrayContainsAny: List<Any>?) = Query(
284-
(inArray?.let { js.where(path, "in", it) } ?: js).let { js2 ->
285-
arrayContainsAny?.let { js2.where(path, "array-contains-any", it) } ?: js2
284+
(inArray?.let { js.where(path, "in", it.toTypedArray()) } ?: js).let { js2 ->
285+
arrayContainsAny?.let { js2.where(path, "array-contains-any", it.toTypedArray()) } ?: js2
286286
}
287287
)
288288

0 commit comments

Comments
 (0)