From: InfinitiesLoop Date: Thu, 22 Jul 2010 17:48:24 +0000 (+0800) Subject: Ticket 6808. Updated per code review comments by jeresig X-Git-Tag: 1.4.3rc1~154 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=266facc08a2e1c8cb5a7a60de304da47657f2227;p=jquery.git Ticket 6808. Updated per code review comments by jeresig --- diff --git a/src/data.js b/src/data.js index 6dcfb4c22..c524a457d 100644 --- a/src/data.js +++ b/src/data.js @@ -51,7 +51,7 @@ jQuery.extend({ } else { cache[ id ] = function() { return jQuery.extend(true, {}, name); - } + }; } } else if ( !cache[ id ] ) { @@ -61,15 +61,12 @@ jQuery.extend({ var store = {}; cache[ id ] = function() { return store; - } + }; } } - thisCache = cache[ id ]; - if ( !isNode ) { - thisCache = thisCache(); - } + thisCache = isNode? cache[ id ] : cache[ id ](); // Prevent overriding the named cache with undefined values if ( data !== undefined ) {