]> source.dussan.org Git - jquery.git/commitdiff
Ticket 6808. Updated per code review comments by jeresig
authorInfinitiesLoop <dareed@microsoft.com>
Thu, 22 Jul 2010 17:48:24 +0000 (01:48 +0800)
committerJohn Resig <jeresig@gmail.com>
Thu, 22 Jul 2010 19:52:02 +0000 (03:52 +0800)
src/data.js

index 6dcfb4c2278ca44ac595a2538ebd9e43b18f4ce6..c524a457dfa2c817a0f7dfe6d3b9bcd3b84aa785 100644 (file)
@@ -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 ) {