Commit 2ce5e959 authored by Rick Waldron's avatar Rick Waldron

Supports interoperable removal of hyphenated/camelCase properties. Fixes #9413

parent 7daf44b5
......@@ -135,7 +135,12 @@ jQuery.extend({
return;
}
var internalKey = jQuery.expando, isNode = elem.nodeType,
var thisCache,
// Reference to internal data cache key
internalKey = jQuery.expando,
isNode = elem.nodeType,
// See jQuery.data for more information
cache = isNode ? jQuery.cache : elem,
......@@ -150,9 +155,16 @@ jQuery.extend({
}
if ( name ) {
var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
if ( thisCache ) {
// Support interoperable removal of hyphenated or camelcased keys
if ( !thisCache[ name ] ) {
name = jQuery.camelCase( name );
}
delete thisCache[ name ];
// If there is no data left in the cache, we want to continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment