@revopush/react-native-code-push 1.5.0 → 1.5.1
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.
|
@@ -849,7 +849,14 @@ public class CodePushNativeModule extends BaseJavaModule {
|
|
|
849
849
|
public ReactHostDelegate getReactHostDelegate(ReactHostImpl reactHostImpl) {
|
|
850
850
|
try {
|
|
851
851
|
Class<?> clazz = reactHostImpl.getClass();
|
|
852
|
-
Field field
|
|
852
|
+
Field field;
|
|
853
|
+
try {
|
|
854
|
+
// RN < 0.81
|
|
855
|
+
field = clazz.getDeclaredField("mReactHostDelegate");
|
|
856
|
+
} catch (NoSuchFieldException e) {
|
|
857
|
+
// RN >= 0.81
|
|
858
|
+
field = clazz.getDeclaredField("reactHostDelegate");
|
|
859
|
+
}
|
|
853
860
|
field.setAccessible(true);
|
|
854
861
|
|
|
855
862
|
// Get the value of the field for the provided instance
|
package/package.json
CHANGED
|
Binary file
|