Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rlepinski committed Aug 30, 2024
1 parent 2f4609e commit 5d28247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/AirshipEmbeddedViewWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ struct ReactAirshipEmbeddedView: View {

var height: CGFloat {
guard let height = self.size?.height, height > 0 else {
return try! AirshipUtils.mainWindow()?.screen.bounds.height ?? 500
return (try? AirshipUtils.mainWindow()?.screen.bounds.height) ?? 500
}
return height
}

var width: CGFloat {
guard let width = self.size?.width, width > 0 else {
return try! AirshipUtils.mainWindow()?.screen.bounds.width ?? 500
return (try? AirshipUtils.mainWindow()?.screen.bounds.width) ?? 500
}
return width
}
Expand Down

0 comments on commit 5d28247

Please sign in to comment.