Skip to content

Commit 7060efe

Browse files
persidskiygithub-actions[bot]
authored andcommitted
Remove force unwrap operator in OrnamentsManager (#7103)
GitOrigin-RevId: f1fa9cb49a13a97f72b6e1599de24cb58d5580ce
1 parent 14527e3 commit 7060efe

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Mapbox welcomes participation and contributions from everyone.
55
## main
66

77
* Introduced `ScaleBarViewOptions.units` property supporting metric, imperial, and nautical units, replacing the boolean `useMetricUnits` property.
8+
* Fix crash in `OrnamentsManager` when setting attribution color.
89

910
## 11.16.0-beta.1 - 23 September, 2025
1011

Sources/MapboxMaps/Ornaments/OrnamentsManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ public final class OrnamentsManager {
236236
}
237237

238238
private func constraints(with view: UIView, position: OrnamentPosition, margins: CGPoint) -> [NSLayoutConstraint] {
239-
let layoutGuide = view.superview!.safeAreaLayoutGuide
239+
guard let layoutGuide = view.superview?.safeAreaLayoutGuide else {
240+
return []
241+
}
240242
switch position {
241243
case .topLeft:
242244
return [

0 commit comments

Comments
 (0)