增加接口无数据时保护。review by 孙凯。
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -66,11 +66,11 @@ class TalentRank extends Component { | @@ -66,11 +66,11 @@ class TalentRank extends Component { | ||
66 | <RankBody | 66 | <RankBody |
67 | monthRank={true} | 67 | monthRank={true} |
68 | fetchNextPage={this._fetchNextPage} | 68 | fetchNextPage={this._fetchNextPage} |
69 | - dataSource={monthRankData.get('rankList').get('list')} | 69 | + dataSource={(monthRankData && monthRankData.get('rankList')) ? monthRankData.get('rankList').get('list') : []} |
70 | style={styles.container}/> | 70 | style={styles.container}/> |
71 | <RankBody | 71 | <RankBody |
72 | fetchNextPage={this._fetchNextPage} | 72 | fetchNextPage={this._fetchNextPage} |
73 | - dataSource={totalRankData.get('rankList').get('list')} | 73 | + dataSource={(totalRankData && totalRankData.get('rankList')) ? totalRankData.get('rankList').get('list') : []} |
74 | style={styles.container}/> | 74 | style={styles.container}/> |
75 | </ScrollView> | 75 | </ScrollView> |
76 | </View> | 76 | </View> |
-
Please register or login to post a comment