Skip to content

empty when resolves with 1 undefined argument in jQuery 3 (was 0 arguments in jQuery 2) #3442

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

Closed
i23098 opened this issue Dec 9, 2016 · 1 comment
Assignees
Milestone

Comments

@i23098
Copy link

i23098 commented Dec 9, 2016

Description

I use dynamic array of deferreds to load 0 to N things and then loop through the arguments in the done callback. Upgrading to jQuery 3.1.1 from 2.2.4 and now my code breaks :(

Link to test case

Minimal test case is call $.when with no arguments, so it should resolve with no arguments too...

2.2.4 - https://jsfiddle.net/nuzy6b43/ - This will correctly have 0 arguments in the done callback
3.1.1 - https://jsfiddle.net/4qys5duk/ - This will incorrectly have 1 argument in the done callback

@gibson042
Copy link
Member

Nice catch. Thanks, @i23098!

@gibson042 gibson042 self-assigned this Dec 11, 2016
@gibson042 gibson042 added this to the 3.2.0 milestone Dec 11, 2016
gibson042 added a commit to gibson042/jquery that referenced this issue Dec 11, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants