mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 10:25:08 -05:00
Make .data(Object) extend the existing data object. Fixes #6692.
This commit is contained in:
@@ -52,9 +52,10 @@ jQuery.extend({
|
||||
// want to manipulate it.
|
||||
if ( typeof name === "object" ) {
|
||||
if ( isNode ) {
|
||||
cache[ id ] = jQuery.extend(true, {}, name);
|
||||
cache[ id ] = jQuery.extend(cache[ id ], name);
|
||||
|
||||
} else {
|
||||
store = jQuery.extend(true, {}, name);
|
||||
store = jQuery.extend(cache[ id ], name);
|
||||
cache[ id ] = function() {
|
||||
return store;
|
||||
};
|
||||
@@ -63,6 +64,7 @@ jQuery.extend({
|
||||
} else if ( !cache[ id ] ) {
|
||||
if ( isNode ) {
|
||||
cache[ id ] = {};
|
||||
|
||||
} else {
|
||||
store = {};
|
||||
cache[ id ] = function() {
|
||||
|
||||
Reference in New Issue
Block a user