diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-06-28 08:50:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-28 08:50:40 +0300 |
commit | 02daed6db8fb7269d1b3a466cbb32ed7fab76e85 (patch) | |
tree | a534b2905593d44eece6a9f896522e524cb0d28f /libs/bower_components/jquery/src/ajax/parseJSON.js | |
parent | f981b2579a95ce60a2b7d2aa146925b4d2222e0a (diff) |
Update JQuery to the latest 1.12.4 version (#10260)
* Update JQuery to the latest 1.* version
* UI tests: Updated Jquery to latest version
Diffstat (limited to 'libs/bower_components/jquery/src/ajax/parseJSON.js')
-rw-r--r-- | libs/bower_components/jquery/src/ajax/parseJSON.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/bower_components/jquery/src/ajax/parseJSON.js b/libs/bower_components/jquery/src/ajax/parseJSON.js index 69b5c837d8..34efb79b21 100644 --- a/libs/bower_components/jquery/src/ajax/parseJSON.js +++ b/libs/bower_components/jquery/src/ajax/parseJSON.js @@ -1,12 +1,14 @@ -define([ +define( [ "../core" ], function( jQuery ) { var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g; jQuery.parseJSON = function( data ) { + // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { + // Support: Android 2.3 // Workaround failure to string-cast null input return window.JSON.parse( data + "" ); @@ -41,11 +43,11 @@ jQuery.parseJSON = function( data ) { // Remove this token return ""; - }) ) ? + } ) ) ? ( Function( "return " + str ) )() : jQuery.error( "Invalid JSON: " + data ); }; return jQuery.parseJSON; -}); +} ); |