Skip to content

Commit 017478d

Browse files
author
Corentin Smith
committed
Fix invariant bug from facebook#15419
1 parent 84c063c commit 017478d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Libraries/Lists/VirtualizedList.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,11 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
240240

241241
/**
242242
* Scroll to a specific content pixel offset in the list.
243-
*
243+
*
244244
* Param `offset` expects the offset to scroll to.
245245
* In case of `horizontal` is true, the offset is the x-value,
246246
* in any other case the offset is the y-value.
247-
*
247+
*
248248
* Param `animated` (`true` by default) defines whether the list
249249
* should do an animation while scrolling.
250250
*/
@@ -392,7 +392,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
392392
last = Math.min(end, last);
393393
for (let ii = first; ii <= last; ii++) {
394394
const item = getItem(data, ii);
395-
invariant(item, 'No item for index ' + ii);
395+
invariant(item !== false, 'No item for index ' + ii);
396396
const key = keyExtractor(item, ii);
397397
if (stickyIndicesFromProps.has(ii + stickyOffset)) {
398398
stickyHeaderIndices.push(cells.length);

0 commit comments

Comments
 (0)