react-native-modalize
react-native-modalize copied to clipboard
Crash on Android with React Native 0.70
I'm getting a crash on React Native 0.70 (works fine on 0.69) - with the error:
TypeError: Cannot read property 'layout' of null
This seems to be down to this code, which only runs on Android.
The handleModalizeContentLayout
function is defined here.
Having done some console logging, on React Native 0.70, the argument that gets passed to handleModalizeContentLayout
is:
{
"_dispatchInstances":null,
"_dispatchListeners":null,
"_targetInst":null,
"bubbles":null,
"cancelable":null,
"currentTarget":[
"Function currentTarget"
],
"defaultPrevented":null,
"dispatchConfig":null,
"eventPhase":null,
"isDefaultPrevented":[
"Function functionThatReturnsFalse"
],
"isPropagationStopped":[
"Function functionThatReturnsFalse"
],
"isTrusted":null,
"nativeEvent":null,
"target":null,
"timeStamp":[
"Function timeStamp"
],
"type":null
}
i.e. nativeEvent
is null, whereas in React Native 0.69 it isn't.
I can't find any changes in the React Native 0.70 changelog about this - is anyone else experiencing this?
I believe this is the same bug as https://github.com/jeremybarbet/react-native-modalize/issues/451
It's also mentioned in #455.
Yes, I am also experiencing it on react-native 0.71.8