Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear debounceCheck when deactivating #62

Merged
merged 1 commit into from
Jan 12, 2017
Merged

Clear debounceCheck when deactivating #62

merged 1 commit into from
Jan 12, 2017

Conversation

danistefanovic
Copy link
Contributor

The VisibilitySensor doesn't get reactivated if scrollCheck is active. That's because this.debounceCheck is not cleared properly and still contains the debounced function after stopWatching() has run.

Under these circumstances, the following condition is true and startWatching() gets skipped:

  startWatching: function () {
    if (this.debounceCheck || this.interval) { return; }

@joshwnj
Copy link
Owner

joshwnj commented Jan 12, 2017

Thanks @danistefanovic , good catch :)

@joshwnj joshwnj merged commit bfa6555 into joshwnj:master Jan 12, 2017
@joshwnj
Copy link
Owner

joshwnj commented Jan 12, 2017

Published to npm as v3.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants