#14384 closed bug (duplicate)
JQuery 1.10.2 is not working with IE10
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | ajax | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
We are facing issue when we are parsing a json data.
Below is the function which throws error
parseJSON: function( data ) {
Attempt to parse using the native JSON parser first
if (window.JSON && window.JSON.parse) {
return window.JSON.parse( data ); We are getting error from this line due to data is undefined
}
if (data === null) {
return data;
}
if ( typeof data === "string" ) {
Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data );
if ( data ) {
Make sure the incoming data is actual JSON Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" )
.replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) {
return ( new Function( "return " + data ) )();
}
}
}
jQuery.error( "Invalid JSON: " + data );
}
Change History (2)
comment:1 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 9 years ago by
Component: | unfiled → ajax |
---|
Duplicate of #13169.
undefined
is not valid JSON and is expected to generate an exception.