Skip to content

Commit 68b782a

Browse files
Fix GraphHost.continueTransaction (#675)
Co-authored-by: Kyle <kyle201817146@gmail.com>
1 parent 7b4928d commit 68b782a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sources/OpenSwiftUICore/Graph/GraphHost.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,17 +426,21 @@ extension GraphHost {
426426
package final func emptyTransaction(_ transaction: Transaction = .init()) {
427427
asyncTransaction(transaction, mutation: EmptyGraphMutation())
428428
}
429-
429+
430+
// Audited for 6.5.4
430431
package final func continueTransaction(_ body: @escaping () -> Void) {
431432
Update.assertIsLocked()
432433
var host = self
433434
while !host.inTransaction {
434435
guard let parent = host.parentHost else {
435-
Update.enqueueAction(body)
436+
Update.enqueueAction(reason: nil) {
437+
host.asyncTransaction { body() }
438+
}
436439
return
437440
}
438441
host = parent
439442
}
443+
// TODO: CustomEventTrace
440444
host.continuations.append(body)
441445
}
442446

0 commit comments

Comments
 (0)