Kaynağa Gözat

fixed crash on iOS

Daniel Zlotin 8 yıl önce
ebeveyn
işleme
037afae308
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      example-redux/src/screens/LoginScreen.js

+ 1
- 1
example-redux/src/screens/LoginScreen.js Dosyayı Görüntüle

@@ -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>