Procházet zdrojové kódy

fixed crash on iOS

Daniel Zlotin před 8 roky
rodič
revize
037afae308
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      example-redux/src/screens/LoginScreen.js

+ 1
- 1
example-redux/src/screens/LoginScreen.js Zobrazit soubor

@@ -47,7 +47,7 @@ class LoginScreen extends Component {
47 47
           <Text style={styles.button}>Show another login as modal</Text>
48 48
         </TouchableOpacity>
49 49
 
50
-        <Text style={{fontWeight: '500'}}>Function prop: {this.props.fn()}</Text>
50
+        <Text style={{fontWeight: '500'}}>Function prop: {this.props.fn ? this.props.fn() : ''}</Text>
51 51
         <Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
52 52
         <Text style={{fontWeight: '500'}}>Number prop: {this.props.num}</Text>
53 53
         <Text style={{fontWeight: '500'}}>Object prop: {this.props.obj.str}</Text>