We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d6cc15 commit d87d7ecCopy full SHA for d87d7ec
src/core.js
@@ -40,7 +40,7 @@ jQuery.fn.init.prototype = jQuery.fn;
40
41
// Let $.parseJSON(falsy_value) return null
42
jQuery.parseJSON = function( json ) {
43
- if ( !json && json !== null ) {
+ if ( !json ) {
44
migrateWarn("jQuery.parseJSON requires a valid JSON string");
45
return null;
46
}
test/core.js
@@ -107,7 +107,7 @@ test( "jQuery.parseJSON() falsy values", function() {
107
expectNoWarning( "valid JSON", function() {
108
jQuery.parseJSON("{\"a\":1}");
109
});
110
- expectNoWarning( "actual null", function() {
+ expectWarning( "actual null", function() {
111
jQuery.parseJSON(null);
112
113
expectNoWarning( "string null", function() {
0 commit comments