]> source.dussan.org Git - jquery.git/commitdiff
Update jQuery.data to use jQuery.noop for toJSON hack instead of an additional superf...
authorColin Snover <github.com@zetafleet.com>
Mon, 14 Feb 2011 22:30:18 +0000 (16:30 -0600)
committerColin Snover <github.com@zetafleet.com>
Mon, 14 Feb 2011 22:30:18 +0000 (16:30 -0600)
src/data.js

index 66d229256e43bc53798a29274afb694f4dc766bd..6efe7b01d45680550f40be7da259496159530f9f 100644 (file)
@@ -68,9 +68,7 @@ jQuery.extend({
                        // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
                        // metadata on plain JS objects when the object is serialized using
                        // JSON.stringify
-                       cache[ id ].toJSON = function () {
-                               return undefined;
-                       };
+                       cache[ id ].toJSON = jQuery.noop;
                }
 
                // An object can be passed to jQuery.data instead of a key/value pair; this gets