Skip to content

Commit

Permalink
Update jQuery.data to use jQuery.noop for toJSON hack instead of an a…
Browse files Browse the repository at this point in the history
…dditional superfluous function.
  • Loading branch information
csnover committed Feb 14, 2011
1 parent 2ed8170 commit 2cc03a8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/data.js
Expand Up @@ -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
Expand Down

0 comments on commit 2cc03a8

Please sign in to comment.