Skip to content

Commit

Permalink
added null check on scrollToOffset call method
Browse files Browse the repository at this point in the history
  • Loading branch information
Biki-das committed Mar 28, 2024
1 parent 00cc1bb commit 2b914ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rn-tester/js/examples/FlatList/FlatList-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class FlatListExample extends React.PureComponent<Props, State> {
};

_onChangeScrollOffset = (text: mixed) => {
this._listRef.scrollToOffset({offset: Number(text), animated: false});
this._listRef?.scrollToOffset({offset: Number(text), animated: false});
};

// $FlowFixMe[missing-local-annot]
Expand Down

0 comments on commit 2b914ff

Please sign in to comment.