Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Manipulation: don't use Object.keys for consistency

Fixes #14659
  • Loading branch information...
commit a96d5bed58f2b30f97d6dd2f5691cd890f62b75f 1 parent 984f77a
@mzgol mzgol authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/manipulation.js
View
7 src/manipulation.js
@@ -276,7 +276,7 @@ jQuery.extend({
},
cleanData: function( elems ) {
- var data, elem, events, type, key, j,
+ var data, elem, type, key,
special = jQuery.event.special,
i = 0;
@@ -285,9 +285,8 @@ jQuery.extend({
key = elem[ data_priv.expando ];
if ( key && (data = data_priv.cache[ key ]) ) {
- events = Object.keys( data.events || {} );
- if ( events.length ) {
- for ( j = 0; (type = events[j]) !== undefined; j++ ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );
Please sign in to comment.
Something went wrong with that request. Please try again.