diff --git a/Libraries/Components/RefreshControl/RefreshControl.js b/Libraries/Components/RefreshControl/RefreshControl.js index 0f3f4c857557df..98ce10af6d0d73 100644 --- a/Libraries/Components/RefreshControl/RefreshControl.js +++ b/Libraries/Components/RefreshControl/RefreshControl.js @@ -20,15 +20,16 @@ const nullthrows = require('nullthrows'); import type {ColorValue} from 'StyleSheetTypes'; import type {ViewProps} from 'ViewPropTypes'; +let RefreshLayoutConsts; if (Platform.OS === 'android') { const AndroidSwipeRefreshLayout = require('UIManager').getViewManagerConfig( 'AndroidSwipeRefreshLayout', ); - var RefreshLayoutConsts = AndroidSwipeRefreshLayout + RefreshLayoutConsts = AndroidSwipeRefreshLayout ? AndroidSwipeRefreshLayout.Constants : {SIZE: {}}; } else { - var RefreshLayoutConsts = {SIZE: {}}; + RefreshLayoutConsts = {SIZE: {}}; } type NativeRefreshControlType = Class>; diff --git a/Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js b/Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js index 7fc4fadeac9683..873573ad8a025c 100644 --- a/Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js +++ b/Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js @@ -132,20 +132,21 @@ class TabBarItemIOS extends React.Component { showedDeprecationWarning = true; } } - + render() { const {style, children, ...props} = this.props; // if the tab has already been shown once, always continue to show it so we // preserve state between tab transitions + let tabContents; if (this.state.hasBeenSelected) { - var tabContents = ( + tabContents = ( {children} ); } else { - var tabContents = ; + tabContents = ; } return (