Pārlūkot izejas kodu

fixed crash on iOS

Daniel Zlotin 8 gadus atpakaļ
vecāks
revīzija
037afae308
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      example-redux/src/screens/LoginScreen.js

+ 1
- 1
example-redux/src/screens/LoginScreen.js Parādīt failu

47
           <Text style={styles.button}>Show another login as modal</Text>
47
           <Text style={styles.button}>Show another login as modal</Text>
48
         </TouchableOpacity>
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
         <Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
51
         <Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
52
         <Text style={{fontWeight: '500'}}>Number prop: {this.props.num}</Text>
52
         <Text style={{fontWeight: '500'}}>Number prop: {this.props.num}</Text>
53
         <Text style={{fontWeight: '500'}}>Object prop: {this.props.obj.str}</Text>
53
         <Text style={{fontWeight: '500'}}>Object prop: {this.props.obj.str}</Text>