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 27, 2024
1 parent 4972a4a commit 54d6460
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 54d6460

Please sign in to comment.