@react-native-menu/menu 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  #import <React/RCTViewManager.h>
2
2
  #import <React/RCTUIManager.h>
3
- #import "RCTBridge.h"
3
+ #import <React/RCTBridge.h>
4
4
 
5
5
  #ifdef RCT_NEW_ARCH_ENABLED
6
6
  // NEW ARCH
@@ -28,7 +28,9 @@ class RCTAlertAction {
28
28
  self.title = "";
29
29
  }
30
30
 
31
- if let image = details["image"] as? NSString {
31
+ // The new architecture sends an unset image as an empty string, and
32
+ // UIImage(named: "") logs "Invalid asset name supplied" each time the menu is built.
33
+ if let image = details["image"] as? NSString, image.length > 0 {
32
34
  if #available(iOS 13.0, *) {
33
35
  self.image = UIImage(systemName: image as String)
34
36
  if let imageColor = details["imageColor"] {
@@ -27,7 +27,9 @@ class RCTMenuAction {
27
27
  self.identifier = UIAction.Identifier(rawValue: identifier as String);
28
28
  }
29
29
 
30
- if let image = details["image"] as? NSString {
30
+ // The new architecture sends an unset image as an empty string, and
31
+ // UIImage(named: "") logs "Invalid asset name supplied" each time the menu is built.
32
+ if let image = details["image"] as? NSString, image.length > 0 {
31
33
  self.image = UIImage(systemName: image as String);
32
34
  if self.image === nil {
33
35
  self.image = UIImage(named: image as String)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-menu/menu",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "UIMenu component for react-native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -60,10 +60,10 @@
60
60
  "@types/react": "^19.1.12",
61
61
  "@types/react-native": "0.73.0",
62
62
  "jest": "^29.2.1",
63
- "pod-install": "1.0.6",
63
+ "pod-install": "1.2.1",
64
64
  "react": "19.1.0",
65
65
  "react-native": "^0.81.1",
66
- "react-native-builder-bob": "^0.43.0",
66
+ "react-native-builder-bob": "^0.44.1",
67
67
  "react-native-test-app": "^4.4.9",
68
68
  "release-it": "^18.1.1",
69
69
  "typescript": "5.9.3"