diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 939aceee6ff2f7..b3e81c05c97ddb 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -326,7 +326,9 @@ class VirtualizedList extends React.PureComponent { const {animated, index, viewOffset, viewPosition} = params; invariant( index >= 0 && index < getItemCount(data), - `scrollToIndex out of range: ${index} vs ${getItemCount(data) - 1}`, + `scrollToIndex out of range: requested index ${index} but maximum is ${getItemCount( + data, + ) - 1}`, ); if (!getItemLayout && index > this._highestMeasuredFrameIndex) { invariant(