Skip to content

Commit a72743a

Browse files
committed
1 parent 5317b3d commit a72743a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Sources/ScrollViewProxy/ScrollViewProxy.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ public struct ScrollViewReader<Content: View>: View {
156156
// https://stackoverflow.com/a/61765994/3019595
157157
}
158158
.introspectScrollView {
159-
self.proxy.coordinator.scrollView = $0
160-
self.proxy.offset = $0.offsetPublisher
159+
if self.proxy.coordinator.scrollView != $0 {
160+
self.proxy.coordinator.scrollView = $0
161+
self.proxy.offset = $0.offsetPublisher
162+
}
161163
}
162164
}
163165
}

0 commit comments

Comments
 (0)