mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 17:14:58 -05:00
Data: do not create data cache when fetching single property
Closes gh-2554
This commit is contained in:
committed by
Michał Gołębiowski
parent
5adf04a73c
commit
f5bf9bc488
@@ -72,13 +72,11 @@ Data.prototype = {
|
||||
return cache;
|
||||
},
|
||||
get: function( owner, key ) {
|
||||
var cache = this.cache( owner );
|
||||
|
||||
return key === undefined ?
|
||||
cache :
|
||||
this.cache( owner ) :
|
||||
|
||||
// Always use camelCase key (gh-2257)
|
||||
cache[ jQuery.camelCase( key ) ];
|
||||
owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];
|
||||
},
|
||||
access: function( owner, key, value ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user