File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ const COMMAND_KEYS = {
5151 requestModalPresentation : 'requestModalPresentation' ,
5252} ;
5353
54-
5554const VirtualizedListContext = React . createContext ( null ) ;
55+ // fix for react-native 0.60
56+ const hasScrollViewContext = ( ScrollView . Context ?. Provider != null ) ;
5657
5758export class ModalView extends React . PureComponent {
5859 static proptypes = {
@@ -348,9 +349,13 @@ export class ModalView extends React.PureComponent {
348349 setIsModalInPresentation : this . setIsModalInPresentation ,
349350 } } >
350351 < VirtualizedListContext . Provider value = { null } >
351- < ScrollView . Context . Provider value = { null } >
352- { this . _renderModal ( ) }
353- </ ScrollView . Context . Provider >
352+ { hasScrollViewContext ? (
353+ < ScrollView . Context . Provider value = { null } >
354+ { this . _renderModal ( ) }
355+ </ ScrollView . Context . Provider >
356+ ) :(
357+ this . _renderModal ( )
358+ ) }
354359 </ VirtualizedListContext . Provider >
355360 </ ModalContext . Provider >
356361 ) ;
You can’t perform that action at this time.
0 commit comments