mirror of
https://github.com/jquery/jquery.git
synced 2026-02-09 21:15:51 -05:00
Fix #14492: More correct jQuery.parseJSON. Close gh-1419.
(cherry picked from commit 60a6178131)
Conflicts:
src/ajax/parseJSON.js
This commit is contained in:
@@ -2,7 +2,11 @@ define([
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
|
||||
jQuery.parseJSON = JSON.parse;
|
||||
// Support: Android 2.3
|
||||
// Workaround failure to string-cast null input
|
||||
jQuery.parseJSON = function( data ) {
|
||||
return JSON.parse( data + "" );
|
||||
};
|
||||
|
||||
return jQuery.parseJSON;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user