mirror of https://github.com/vector-im/riot-web
Remove fairly redundant condition
Making sure that a node is intersected by the bottom of the wrapper is a bit overkill, given that we iterate from the bottom. This also prevents the scenario of having no nodes that are not precisely intersected, but possibly straddling the bottom of the wrapper.pull/21833/head
parent
47f29b9454
commit
423babdb17
|
@ -599,8 +599,7 @@ module.exports = React.createClass({
|
|||
// as the scrollToken.
|
||||
// If this is false for the entire for-loop, we default to the last node
|
||||
// (which is why newScrollState is set on every iteration).
|
||||
if (boundingRect.top < wrapperRect.bottom &&
|
||||
wrapperRect.bottom < boundingRect.bottom) {
|
||||
if (boundingRect.top < wrapperRect.bottom) {
|
||||
// Use this node as the scrollToken
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue