Skip to content

Commit

Permalink
fix: set width and height only if they are not infinite
Browse files Browse the repository at this point in the history
  • Loading branch information
s2mr committed May 21, 2024
1 parent fbe7dac commit e1190a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SwiftUISupport/ComponentSwiftUISupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ private struct ComponentRepresenting<C: Component>: UIViewRepresentable {
uiView: UIComponentView,
context: Context
) -> CGSize? {
if let width = proposal.width {
if let width = proposal.width, width.isFinite {
uiView.bounds.size.width = width
}
if let height = proposal.height {
if let height = proposal.height, height.isFinite {
uiView.bounds.size.height = height
}

Expand Down

0 comments on commit e1190a6

Please sign in to comment.