File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,12 @@ jQuery.extend({
135
135
return ;
136
136
}
137
137
138
- var internalKey = jQuery . expando , isNode = elem . nodeType ,
138
+ var thisCache ,
139
+
140
+ // Reference to internal data cache key
141
+ internalKey = jQuery . expando ,
142
+
143
+ isNode = elem . nodeType ,
139
144
140
145
// See jQuery.data for more information
141
146
cache = isNode ? jQuery . cache : elem ,
@@ -150,9 +155,16 @@ jQuery.extend({
150
155
}
151
156
152
157
if ( name ) {
153
- var thisCache = pvt ? cache [ id ] [ internalKey ] : cache [ id ] ;
158
+
159
+ thisCache = pvt ? cache [ id ] [ internalKey ] : cache [ id ] ;
154
160
155
161
if ( thisCache ) {
162
+
163
+ // Support interoperable removal of hyphenated or camelcased keys
164
+ if ( ! thisCache [ name ] ) {
165
+ name = jQuery . camelCase ( name ) ;
166
+ }
167
+
156
168
delete thisCache [ name ] ;
157
169
158
170
// If there is no data left in the cache, we want to continue
You can’t perform that action at this time.
0 commit comments