@mpxjs/core 2.10.3-beta.1 → 2.10.3-beta.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.10.3-beta.1",
3
+ "version": "2.10.3-beta.5",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -12,10 +12,12 @@ import { createSelectorQuery, createIntersectionObserver } from '@mpxjs/api-prox
12
12
  import { IntersectionObserverContext, RouteContext, KeyboardAvoidContext } from '@mpxjs/webpack-plugin/lib/runtime/components/react/dist/context'
13
13
  import MpxKeyboardAvoidingView from '@mpxjs/webpack-plugin/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view'
14
14
 
15
- const ProviderContext = createContext(null)
16
15
  const windowDimensions = ReactNative.Dimensions.get('window')
17
16
  const screenDimensions = ReactNative.Dimensions.get('screen')
17
+ const ProviderContext = createContext(null)
18
18
  function getSystemInfo () {
19
+ const windowDimensions = ReactNative.Dimensions.get('window')
20
+ const screenDimensions = ReactNative.Dimensions.get('screen')
19
21
  return {
20
22
  deviceOrientation: windowDimensions.width > windowDimensions.height ? 'landscape' : 'portrait',
21
23
  size: {
@@ -46,7 +48,7 @@ function createEffect (proxy, components) {
46
48
  if (tagName === 'block') return Fragment
47
49
  const appComponents = global.__getAppComponents?.() || {}
48
50
  const generichash = proxy.target.generichash || ''
49
- const genericComponents = global.__mpxGenericsMap[generichash] || noop
51
+ const genericComponents = global.__mpxGenericsMap?.[generichash] || noop
50
52
  return components[tagName] || genericComponents(tagName) || appComponents[tagName] || getByPath(ReactNative, tagName)
51
53
  }
52
54
  const innerCreateElement = (type, ...rest) => {