Skip to content

Commit

Permalink
refactor: Add early guard
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu-dgl committed Oct 29, 2024
1 parent ea58adf commit 44d5410
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ public struct SelfSizingPanelViewModifier: ViewModifier {
.padding(.bottom, value: .medium)
}
.introspect(.scrollView, on: .iOS(.v16, .v17, .v18)) { scrollView in
guard selection != .height(headerSize) else { return }
let totalPanelContentHeight = scrollView.contentSize.height + headerSize
guard selection != .height(totalPanelContentHeight) else { return }

Expand Down

0 comments on commit 44d5410

Please sign in to comment.