File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
firebase-common/src/jsMain/kotlin/dev/gitlive/firebase/externals/database
firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,10 @@ external interface ThenableReference : DatabaseReference
115
115
116
116
external interface DataSnapshot {
117
117
val key: String?
118
+ val size: Int
118
119
fun `val` (): Any
119
120
fun exists (): Boolean
120
121
fun forEach (action : (a: DataSnapshot ) -> Boolean ): Boolean
121
- fun numChildren (): Int
122
122
fun child (path : String ): DataSnapshot
123
123
}
124
124
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ actual class DataSnapshot internal constructor(val js: JsDataSnapshot) {
164
164
actual fun child (path : String ) = DataSnapshot (js.child(path))
165
165
166
166
actual val children: Iterable <DataSnapshot > = rethrow {
167
- ArrayList <DataSnapshot >(js.numChildren() ).also {
167
+ ArrayList <DataSnapshot >(js.size ).also {
168
168
js.forEach { snapshot -> it.add(DataSnapshot (snapshot)) }
169
169
}
170
170
}
You can’t perform that action at this time.
0 commit comments