There was an error while loading. Please reload this page.
1 parent ded175a commit e284385Copy full SHA for e284385
1 file changed
src/index.js
@@ -22,7 +22,6 @@ export default class LazyFastdom extends Component {
22
23
componentDidMount() {
24
this.mounted = true;
25
-
26
pendingList.add(this);
27
this.checkVisibility();
28
}
@@ -62,8 +61,10 @@ export default class LazyFastdom extends Component {
62
61
};
63
64
+ // This method is called asynchronously from a throttle function
65
+ // inside PendingList instance.
66
checkVisibility() {
- if (!this.mounted || this.checkingVisibility) return;
67
+ if (!this.node || !this.mounted || this.checkingVisibility) return;
68
69
const offset = this.getOffset();
70
const eventNode = this.getContainer();
0 commit comments