Skip to content

Commit

Permalink
Check for non-negative indices
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoz committed Mar 12, 2019
1 parent 665957e commit d4a9dec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/createGridComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export default function createGridComponent({

this.scrollTo({
scrollLeft:
columnIndex !== undefined
columnIndex !== undefined && columnIndex >= 0
? getOffsetForColumnAndAlignment(
this.props,
columnIndex,
Expand All @@ -284,7 +284,7 @@ export default function createGridComponent({
)
: scrollLeft,
scrollTop:
rowIndex !== undefined
rowIndex !== undefined && rowIndex >= 0
? getOffsetForRowAndAlignment(
this.props,
rowIndex,
Expand Down

0 comments on commit d4a9dec

Please sign in to comment.