Skip to content

Commit 7504c44

Browse files
committed
fix(database, Android): resolve limit modifier type casting
1 parent 0f9c445 commit 7504c44

File tree

1 file changed

+2
-2
lines changed
  • packages/firebase_database/firebase_database/android/src/main/kotlin/io/flutter/plugins/firebase/database

1 file changed

+2
-2
lines changed

packages/firebase_database/firebase_database/android/src/main/kotlin/io/flutter/plugins/firebase/database/FirebaseDatabasePlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,11 +939,11 @@ class FirebaseDatabasePlugin :
939939
"limit" -> {
940940
when (modifier["name"] as String) {
941941
"limitToFirst" -> {
942-
val value = modifier["limit"] as Int
942+
val value = (modifier["limit"] as Number).toInt()
943943
query = query.limitToFirst(value)
944944
}
945945
"limitToLast" -> {
946-
val value = modifier["limit"] as Int
946+
val value = (modifier["limit"] as Number).toInt()
947947
query = query.limitToLast(value)
948948
}
949949
}

0 commit comments

Comments
 (0)