File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
firebase-database/src/iosMain/kotlin/dev/gitlive/firebase/database Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import dev.gitlive.firebase.database.ChildEvent.Type.*
13
13
import dev.gitlive.firebase.decode
14
14
import kotlinx.coroutines.CompletableDeferred
15
15
import kotlinx.coroutines.FlowPreview
16
- import kotlinx.coroutines.channels.ClosedSendChannelException
17
16
import kotlinx.coroutines.channels.awaitClose
18
17
import kotlinx.coroutines.coroutineScope
19
18
import kotlinx.coroutines.flow.callbackFlow
@@ -164,7 +163,10 @@ actual class DatabaseReference internal constructor(
164
163
val deferred = CompletableDeferred <DataSnapshot >()
165
164
ios.runTransactionBlock(
166
165
block = { firMutableData ->
167
- FIRTransactionResult .successWithValue(transactionUpdate(decode(strategy, firMutableData.value)))
166
+ firMutableData?.value = firMutableData?.value?.let {
167
+ transactionUpdate(decode(strategy, firMutableData.value))
168
+ }
169
+ FIRTransactionResult .successWithValue(firMutableData!! )
168
170
},
169
171
andCompletionBlock = { error, _, snapshot ->
170
172
if (error != null ) {
You can’t perform that action at this time.
0 commit comments