From 2cc03a86fc046e81013d32a662f4043f1c10b436 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 14 Feb 2011 16:30:18 -0600 Subject: [PATCH] Update jQuery.data to use jQuery.noop for toJSON hack instead of an additional superfluous function. --- src/data.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/data.js b/src/data.js index 66d2292..6efe7b0 100644 --- a/src/data.js +++ b/src/data.js @@ -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 -- 1.7.10.4