Skip to content

Commit 1cc99c8

Browse files
authored
Removes unused code (#52)
1 parent 15af681 commit 1cc99c8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/ReactListView.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,9 @@ export default class ReactListView extends Component {
8484
if (index < this.state._instances._originalPositions.length - 1) {
8585
nextNode = this.state._instances._originalPositions[index + 1]
8686
}
87-
if (nextNode) {
88-
}
89-
if (index === 0) {
90-
if (currentWindowScrollTop === c.originalPosition) {
91-
currentNode.style.position = ''
92-
ignoreCheck = true
93-
}
87+
if (index === 0 && currentWindowScrollTop === c.originalPosition) {
88+
currentNode.style.position = ''
89+
ignoreCheck = true
9490
}
9591
if (!ignoreCheck && (c.originalPosition) < (currentWindowScrollTop + this.state._headerFixedPosition + index * currentHeaderHeight)) {
9692
Object.assign(currentNode.style, this.props.styles.fixedPosition)

0 commit comments

Comments
 (0)