-
Notifications
You must be signed in to change notification settings - Fork 20.6k
jQuery.get() 4.0 backward compatibility issue #5426
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
The docs don't say that you can use |
Thanks for the issue and thanks for pointing that out, Dave. We'll mention it in the upgrade guide. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Ehm, in JavaScript "null" IS an Object. I don't agree with it, but it is. Easiest check - development console:
|
See:
Also, note the error message here: Object.getPrototypeOf(null);
// Uncaught TypeError: Cannot convert undefined or null to object |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Issues have been documented at jquery/api.jquery.com#1208 and we added tests in a few Core PRs. I think that's all we need here. |
The jQuery api describes jQuery.get as: jQuery.get( url [, data ] [, success ] [, dataType ] )].
In jQuery 3.5.7 this code, with null for the data parameter, works:
In jQuery 4.0 this code doesn't work anymore, you have to remove the null parameter:
A small change, but this breaks backward compatibility.
The text was updated successfully, but these errors were encountered: