@ohos-ports/react-native-navigation 8.9.0-beta.7 → 8.9.0-beta.9

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.
@@ -38,8 +38,8 @@ const RNNModalViewManager = (0, import_react_native.requireNativeComponent)("RNN
38
38
  const Container = (rnnProps) => {
39
39
  const viewRef = (0, import_react.useRef)(null);
40
40
  (0, import_react.useLayoutEffect)(() => {
41
- const windowWidth = (import_react_native.Dimensions.get("window")||{width:375,height:812}).width;
42
- const windowHeight = (import_react_native.Dimensions.get("window")||{width:375,height:812}).height;
41
+ const windowWidth = ((() => { try { return import_react_native.Dimensions.get("window") || { width: 375, height: 812 }; } catch(e) { return { width: 375, height: 812 }; } })()).width;
42
+ const windowHeight = ((() => { try { return import_react_native.Dimensions.get("window") || { width: 375, height: 812 }; } catch(e) { return { width: 375, height: 812 }; } })()).height;
43
43
  viewRef?.current?.setNativeProps({
44
44
  width: windowWidth,
45
45
  height: windowHeight
@@ -102,7 +102,7 @@ class Modal extends import_react.default.Component {
102
102
  return processed;
103
103
  }
104
104
  }
105
- const height = Math.round((import_react_native.Dimensions.get("window")||{width:375,height:812}).height);
105
+ const height = Math.round(((() => { try { return import_react_native.Dimensions.get("window") || { width: 375, height: 812 }; } catch(e) { return { width: 375, height: 812 }; } })()).height);
106
106
  const SCREEN_ANIMATION_DURATION = 500;
107
107
  const showModalSlideEnterAnimations = {
108
108
  translationY: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohos-ports/react-native-navigation",
3
- "version": "8.9.0-beta.7",
3
+ "version": "8.9.0-beta.9",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android (HarmonyOS port)",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "peerDependencies": {
37
37
  "react": "*",
38
- "@ohos-ports/react-native": "^0.87.1-beta.1"
38
+ "@ohos-ports/react-native": "^0.87.1-beta.2"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@ohos-ports/remx": {
@@ -48,6 +48,6 @@
48
48
  "prop-types": "15.x.x",
49
49
  "react-lifecycles-compat": "^3.0.4",
50
50
  "tslib": "1.9.3",
51
- "react-native": "npm:@ohos-ports/react-native@^0.87.1-beta.1"
51
+ "react-native": "npm:@ohos-ports/react-native@^0.87.1-beta.2"
52
52
  }
53
53
  }