aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.js
diff options
context:
space:
mode:
authorInfinitiesLoop <dareed@microsoft.com>2010-07-23 01:48:24 +0800
committerJohn Resig <jeresig@gmail.com>2010-07-23 03:52:02 +0800
commit266facc08a2e1c8cb5a7a60de304da47657f2227 (patch)
tree20b200acd445969a752a6d413c082345adf1d257 /src/data.js
parent9faab0b74fd316c2161612236d9ea8a01f3c78f8 (diff)
downloadjquery-266facc08a2e1c8cb5a7a60de304da47657f2227.tar.gz
jquery-266facc08a2e1c8cb5a7a60de304da47657f2227.zip
Ticket 6808. Updated per code review comments by jeresig
Diffstat (limited to 'src/data.js')
-rw-r--r--src/data.js9
1 files changed, 3 insertions, 6 deletions
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 ) {