Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ios/Shared/RCTAlertAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class RCTAlertAction {
self.title = "";
}

if let image = details["image"] as? NSString {
// The new architecture sends an unset image as an empty string, and
// UIImage(named: "") logs "Invalid asset name supplied" each time the menu is built.
if let image = details["image"] as? NSString, image.length > 0 {
if #available(iOS 13.0, *) {
self.image = UIImage(systemName: image as String)
if let imageColor = details["imageColor"] {
Expand Down
4 changes: 3 additions & 1 deletion ios/Shared/RCTMenuItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class RCTMenuAction {
self.identifier = UIAction.Identifier(rawValue: identifier as String);
}

if let image = details["image"] as? NSString {
// The new architecture sends an unset image as an empty string, and
// UIImage(named: "") logs "Invalid asset name supplied" each time the menu is built.
if let image = details["image"] as? NSString, image.length > 0 {
self.image = UIImage(systemName: image as String);
if self.image === nil {
self.image = UIImage(named: image as String)
Expand Down