-
Notifications
You must be signed in to change notification settings - Fork 92
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
Bugfix - send action on destroy + memory leaks #138
Conversation
f3a3e81
to
e299cfa
Compare
64595c5
to
14a4325
Compare
1c0c1e5
to
397cc15
Compare
@@ -20,7 +20,6 @@ module('Acceptance | infinity-scrollable', function(hooks) { | |||
await waitFor('.infinity-scrollable.inactive'); | |||
|
|||
assert.equal(findAll('.infinity-svg').length, 20); | |||
assert.equal(findAll('.infinity-scrollable.inactive').length, 1, 'component is inactive after fetching more data'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a race condition. For one, this fails randomly on diff builds. Second, it wouldn't proceed from the await waitFor
unless it didn't find it as inactive.
Passes consistently locally; however, not up on CI.
elem.addEventListener('scroll', () => { | ||
this._debouncedEventHandler('_triggerDidScrollDirection', elem, sensitivity); | ||
}); | ||
this._debouncedEventHandler = this._debouncedEvent.bind(this, '_triggerDidScrollDirection', elem, sensitivity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way I guess would be =>
this._debouncedEventClosure = (e => this._debouncedEventHandler('_triggerDidScrollDirection', elem, sensitivity));
We want to still send the action
didEnterViewport
/didExitViewport
(thanks Nathan H 🏅) even though the component is being torn down.set
ing state is simply around for the nextonIntersection
, which makes it irrelevant in this context.close #141