Ticket 6808. Updated per code review comments by jeresig

This commit is contained in:
InfinitiesLoop 2010-07-23 01:48:24 +08:00 committed by John Resig
parent 9faab0b74f
commit 266facc08a

View file

@ -51,7 +51,7 @@ jQuery.extend({
} else { } else {
cache[ id ] = function() { cache[ id ] = function() {
return jQuery.extend(true, {}, name); return jQuery.extend(true, {}, name);
} };
} }
} else if ( !cache[ id ] ) { } else if ( !cache[ id ] ) {
@ -61,15 +61,12 @@ jQuery.extend({
var store = {}; var store = {};
cache[ id ] = function() { cache[ id ] = function() {
return store; return store;
} };
} }
} }
thisCache = cache[ id ]; thisCache = isNode? cache[ id ] : cache[ id ]();
if ( !isNode ) {
thisCache = thisCache();
}
// Prevent overriding the named cache with undefined values // Prevent overriding the named cache with undefined values
if ( data !== undefined ) { if ( data !== undefined ) {