Skip to content

Commit 98fd19a

Browse files
Fix js transaction name
1 parent 872c1a1 commit 98fd19a

File tree

2 files changed

+2
-2
lines changed
  • firebase-common/src/jsMain/kotlin/dev/gitlive/firebase
  • firebase-database/src/jsMain/kotlin/dev/gitlive/firebase/database

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ external object firebase {
318318
fun update(value: Any?): Promise<Unit>
319319
fun set(value: Any?): Promise<Unit>
320320
fun push(): ThenableReference
321-
fun <T> runTransaction(
321+
fun <T> transaction(
322322
transactionUpdate: (currentData: T) -> T,
323323
onComplete: (error: Error?, committed: Boolean, snapshot: DataSnapshot?) -> Unit,
324324
applyLocally: Boolean?

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ actual class DatabaseReference internal constructor(override val js: firebase.da
131131

132132
actual suspend fun <T> runTransaction(strategy: KSerializer<T>, transactionUpdate: (currentData: T) -> T): DataSnapshot {
133133
val deferred = CompletableDeferred<DataSnapshot>()
134-
js.runTransaction(
134+
js.transaction(
135135
transactionUpdate,
136136
{ error, _, snapshot ->
137137
if (error != null) {

0 commit comments

Comments
 (0)