Skip to content

Commit

Permalink
Fix ref for scrollParent
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov committed Jun 29, 2019
1 parent 069a05e commit 8a77970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class LazyLoad extends Component {

componentWillUnmount() {
if (this.props.overflow) {
const parent = scrollParent(this);
const parent = scrollParent(this.ref);
if (parent && typeof parent.getAttribute === 'function') {
const listenerCount = (+parent.getAttribute(LISTEN_FLAG)) - 1;
if (listenerCount === 0) {
Expand Down

0 comments on commit 8a77970

Please sign in to comment.