Skip to content

Commit c95faa3

Browse files
author
JWI
committed
a
1 parent 649a9f4 commit c95faa3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftCrossUI/ViewGraph/ViewGraphNode.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ public class ViewGraphNode<NodeView: View, Backend: AppBackend>: Sendable {
169169

170170
private func updateEnvironment(_ environment: EnvironmentValues) -> EnvironmentValues {
171171
var newEnvironment = environment
172-
newEnvironment.with(\.onResize) { [weak self] _ in
172+
// Directly assign the closure instead of using keypath
173+
newEnvironment.onResize = { [weak self] newSize in
173174
guard let self = self else { return }
174175
self.bottomUpUpdate()
175176
}

0 commit comments

Comments
 (0)