Skip to content

Commit d76d839

Browse files
author
Claudéric Demers
authored
nit: linting tweaks
1 parent 37f14af commit d76d839

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class VirtualList extends PureComponent {
5050
this.props.scrollToIndex != null && this.getOffsetForIndex(this.props.scrollToIndex) ||
5151
0
5252
),
53-
scrollChangeReason: SCROLL_CHANGE_REQUESTED
53+
scrollChangeReason: SCROLL_CHANGE_REQUESTED,
5454
};
5555

5656
_styleCache = {};
@@ -130,11 +130,14 @@ export default class VirtualList extends PureComponent {
130130
const {onScroll} = this.props;
131131
const offset = this.getNodeOffset();
132132

133-
if(offset < 0 || this.state.offset == offset || e.target !== this.rootNode) {
133+
if (offset < 0 || this.state.offset === offset || e.target !== this.rootNode) {
134134
return;
135135
}
136136

137-
this.setState({offset, scrollChangeReason: SCROLL_CHANGE_OBSERVED});
137+
this.setState({
138+
offset,
139+
scrollChangeReason: SCROLL_CHANGE_OBSERVED,
140+
});
138141

139142
if (typeof onScroll === 'function') {
140143
onScroll(offset, e);

0 commit comments

Comments
 (0)