From 71b2ac524e49c0d1cc4e5d7bd8fd9d5a1317a20b Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Mon, 4 Nov 2013 23:36:15 -0500 Subject: Fix #14492: More correct jQuery.parseJSON. Close gh-1419. (cherry picked from commit 60a6178131afec97b68c9a45bc24459f7b8bd905) Conflicts: src/ajax/parseJSON.js --- src/ajax/parseJSON.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ajax') diff --git a/src/ajax/parseJSON.js b/src/ajax/parseJSON.js index e8c449bca..3a96d15b9 100644 --- a/src/ajax/parseJSON.js +++ b/src/ajax/parseJSON.js @@ -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; -- cgit v1.2.3