File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,14 @@ export default class InfiniteScrollView extends Component {
88 constructor ( props ) {
99 super ( props ) ;
1010
11- var fromIndex = props . fromIndex || Number . NEGATIVE_INFINITY ;
12- var toIndex = props . toIndex || Number . POSITIVE_INFINITY ;
11+ var fromIndex = Number . NEGATIVE_INFINITY ;
12+ if ( props . fromIndex % 1 === 0 ) fromIndex = props . fromIndex ;
13+
14+ var toIndex = Number . POSITIVE_INFINITY ;
15+ if ( props . toIndex % 1 === 0 ) toIndex = props . toIndex ;
1316
1417 var index = 0 ;
15- if ( this . props . index ) index = Math . min ( Math . max ( this . props . index , fromIndex ) , toIndex ) ;
18+ if ( this . props . index % 1 === 0 ) index = Math . min ( Math . max ( this . props . index , fromIndex ) , toIndex ) ;
1619 else index = Math . max ( 0 , fromIndex ) ;
1720
1821 this . _scrollView = null ;
You can’t perform that action at this time.
0 commit comments