-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Fix the way the pending requests module is used in settled.ts #1173
Fix the way the pending requests module is used in settled.ts #1173
Conversation
@@ -44,20 +49,16 @@ if (typeof jQuery !== 'undefined' && _internalPendingRequests) { | |||
// This can be removed once Ember 4.0.0 is released | |||
EmberApplicationInstance.reopen({ | |||
willDestroy(...args: any[]) { | |||
const internalPendingRequests = _internalPendingRequests(); | |||
|
|||
if (internalPendingRequests !== 0) { |
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.
the outer if statement checks that _internalPendingRequestsModule
exists, which I believe makes calling off
and clearPendingRequests
here safe and desirable regardless of what the PendingRequestsCount is
67f0ade
to
3e98c2f
Compare
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.
Thanks @raycohen!
Would it be possible to cut a release that includes this change? |
@rwjblue any chance we can get a release with this 🙏 |
oh dear, sorry y'all; I thought I had already released it 😭 |
Finally released in 2.6.2 |
Thank you! |
Fixes #1172
Related to #1047
Before these changes, the code is confusing a module with one of the functions on that module.