mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fixed crash during ScrollView initialisation if Platform.OS is not iOS or Android
Summary: In case when Platform is different from Android or iOS, ScrollView initialised RCTScrollView two times, which caused a crash. It looks for me that default option is obsolete and can be united with iOS one to fix this issue. ## Changelog: [Internal] [Fixed] - Fixed crash during ScrollView initialisation if Platform.OS is not iOS or Android Reviewed By: ejanzer Differential Revision: D19623046 fbshipit-source-id: 84f8a46ea24b463aa6aae761f4386ab7e4e95f9b
This commit is contained in:
committed by
Facebook Github Bot
parent
0d968fd7dc
commit
6a00a5deab
@@ -24,7 +24,6 @@ const dismissKeyboard = require('../../Utilities/dismissKeyboard');
|
||||
const flattenStyle = require('../../StyleSheet/flattenStyle');
|
||||
const invariant = require('invariant');
|
||||
const processDecelerationRate = require('./processDecelerationRate');
|
||||
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
||||
const resolveAssetSource = require('../../Image/resolveAssetSource');
|
||||
const splitLayoutProps = require('../../StyleSheet/splitLayoutProps');
|
||||
|
||||
@@ -57,12 +56,9 @@ if (Platform.OS === 'android') {
|
||||
AndroidScrollView = ScrollViewNativeComponent;
|
||||
AndroidHorizontalScrollView = AndroidHorizontalScrollViewNativeComponent;
|
||||
AndroidHorizontalScrollContentView = AndroidHorizontalScrollContentViewNativeComponent;
|
||||
} else if (Platform.OS === 'ios') {
|
||||
} else {
|
||||
RCTScrollView = ScrollViewNativeComponent;
|
||||
RCTScrollContentView = ScrollContentViewNativeComponent;
|
||||
} else {
|
||||
RCTScrollView = requireNativeComponent('RCTScrollView');
|
||||
RCTScrollContentView = requireNativeComponent('RCTScrollContentView');
|
||||
}
|
||||
|
||||
export type ScrollResponderType = {
|
||||
|
||||
Reference in New Issue
Block a user