Skip to content

Commit 649a9f4

Browse files
author
JWI
committed
idek anymore
1 parent b738624 commit 649a9f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/SwiftCrossUI/ViewGraph/ViewGraphNode.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,15 @@ public class ViewGraphNode<NodeView: View, Backend: AppBackend>: Sendable {
168168
}
169169

170170
private func updateEnvironment(_ environment: EnvironmentValues) -> EnvironmentValues {
171-
environment.with(\.onResize) { [weak self] _ in
171+
var newEnvironment = environment
172+
newEnvironment.with(\.onResize) { [weak self] _ in
172173
guard let self = self else { return }
173174
self.bottomUpUpdate()
174175
}
176+
return newEnvironment
175177
}
176178

179+
177180
/// Recomputes the view's body, and updates its widget accordingly. The view may or may not
178181
/// propagate the update to its children depending on the nature of the update. If `newView`
179182
/// is provided (in the case that the parent's body got updated) then it simply replaces the

0 commit comments

Comments
 (0)