-
Notifications
You must be signed in to change notification settings - Fork 20.6k
$.param() returns "null" and "undefined" literal if attribute is function #3005
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
Comments
Makes sense to me. Would you like to submit a PR, @jtrumbull? |
@gibson042 Yeah, just wanted to confirm that there wasn't reasoning behind the current setup. |
This is a breaking change so it either needs to land ASAP or wait for 4.0. |
The PR looks good to me. Should we just land it? |
👍 from me |
I don't think this is a breaking change, since "the return value of a function is used instead of the function as a String" still holds (http://api.jquery.com/jQuery.param/ ). But please make an issue or PR in https://github.com/jquery/api.jquery.com if you disagree. |
Hmm, OK. But maybe it's still best to not backport this to 1.12/2.2. |
I'm fine with that. |
I see your point, let's call this a 3.0 feature/fix. |
Will result in
a=undefined&b=null
jsfiddle
The
value == null
check on Line 61 should happen after the ternary statement, since bothvalue
and the result ofvalue()
can be null. i.e.The text was updated successfully, but these errors were encountered: