Skip to content

Commit 68aeedb

Browse files
committed
Fix a regression bug of checking the onScroll prop (#9)
1 parent 08b86b9 commit 68aeedb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InfiniteTree.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export default class extends Component {
253253
if ((scrollToIndex !== undefined) && (scrollToIndex >= 0) && (scrollToIndex < count)) {
254254
virtualListProps.scrollToIndex = scrollToIndex;
255255
}
256-
if (typeof onScroll !== 'function') {
256+
if (typeof onScroll === 'function') {
257257
virtualListProps.onScroll = onScroll;
258258
}
259259

0 commit comments

Comments
 (0)