diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2014-03-09 23:31:59 +0100 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2014-03-09 23:31:59 +0100 |
commit | a96d5bed58f2b30f97d6dd2f5691cd890f62b75f (patch) | |
tree | 8633b86fccabd79146b0ea4810568beb95c657fa /src | |
parent | 984f77a930aa322bcc277762303370d7a2a4667a (diff) | |
download | jquery-a96d5bed58f2b30f97d6dd2f5691cd890f62b75f.tar.gz jquery-a96d5bed58f2b30f97d6dd2f5691cd890f62b75f.zip |
Manipulation: don't use Object.keys for consistency
Fixes #14659
Diffstat (limited to 'src')
-rw-r--r-- | src/manipulation.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index ff7a0d51a..31d0c4edc 100644 --- a/src/manipulation.js +++ b/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 ); |