mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix patch for #7150, which was not deleting the events object properly on plain JS objects. Thanks to jitter for catching it.
This commit is contained in:
@@ -282,11 +282,11 @@ jQuery.event = {
|
||||
handle.elem = null;
|
||||
}
|
||||
|
||||
delete elemData[ eventKey ];
|
||||
delete elemData.events;
|
||||
delete elemData.handle;
|
||||
|
||||
if ( typeof elemData === "function" ) {
|
||||
jQuery.removeData( elem, "events" );
|
||||
jQuery.removeData( elem, eventKey );
|
||||
|
||||
} else if ( jQuery.isEmptyObject( elemData ) ) {
|
||||
jQuery.removeData( elem );
|
||||
|
||||
Reference in New Issue
Block a user