Skip to content

Commit

Permalink
fix: app will crash when click notify
Browse files Browse the repository at this point in the history
  • Loading branch information
liaoliao666 committed Dec 23, 2022
1 parent f41c8b2 commit d34dc2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion screens/TopicDetailScreen_old.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ function TopicDetailScreen() {
key={colorScheme}
ref={flatList}
data={flatedData}
initialScrollIndex={params.initialScrollIndex}
initialScrollIndex={
params.initialScrollIndex != null &&
params.initialScrollIndex < flatedData.length
? params.initialScrollIndex
: undefined
}
onScrollToIndexFailed={info => {
sleep(500).then(() => {
flatList.current?.scrollToIndex({
Expand Down

0 comments on commit d34dc2a

Please sign in to comment.