only copy guid from handler to modifiedHandler if it does not already have one

This commit is contained in:
Brandon Aaron 2009-05-01 00:02:51 +00:00
parent aef1989ba7
commit a4b8fed8ad

View file

@ -66,7 +66,7 @@ jQuery.event = {
if ( special.add ) {
var modifiedHandler = special.add.call( elem, handler, data, namespaces );
if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) {
modifiedHandler.guid = handler.guid;
modifiedHandler.guid = modifiedHandler.guid || handler.guid;
handler = modifiedHandler;
}
}