Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 0973344

Browse files
author
soliury
committed
fix bug that when comments count is 0, press nav title will crache
1 parent 0ad8f4a commit 0973344

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

app/containers/Comments.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,14 @@ class Comments extends Component {
423423
Center: {
424424
text: '评论 ' + count,
425425
onPress: ()=> {
426-
this._listView.setNativeProps({
427-
contentOffset: {
428-
x: 0,
429-
y: 0
430-
}
431-
})
426+
if (count > 0) {
427+
this._listView.setNativeProps({
428+
contentOffset: {
429+
x: 0,
430+
y: 0
431+
}
432+
})
433+
}
432434
}
433435
}
434436
}

0 commit comments

Comments
 (0)