Skip to content

Commit

Permalink
null safety
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Jan 10, 2025
1 parent cce8d21 commit c13e2bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func getShieldConfiguration(placeholders: [String: String?])

let shield = ShieldConfiguration(
backgroundBlurStyle: config["backgroundBlurStyle"] != nil
? UIBlurEffect.Style.init(rawValue: config["backgroundBlurStyle"] as! Int) : nil,
? (config["backgroundBlurStyle"] as? Int).flatMap(UIBlurEffect.Style.init) : nil,
backgroundColor: backgroundColor,
icon: resolveIcon(dict: config),
title: buildLabel(text: title, with: titleColor, placeholders: placeholders),
Expand Down

0 comments on commit c13e2bd

Please sign in to comment.