mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Event: Simplify the check for saved data in leverageNative
Previously, when `leverageNative` handled async events, there was a case where an empty placeholder object was set as a result. Covering both such an object and `false` required a `length` check. However, this is not necessary since gh-5223 and the check was already simplified in other places; this one was missed. Closes gh-5236 Ref gh-5223
This commit is contained in:
parent
6ad3651dbf
commit
dfe212d5a1
@ -556,7 +556,7 @@ function leverageNative( el, type, isSetup ) {
|
|||||||
|
|
||||||
// If this is a native event triggered above, everything is now in order
|
// If this is a native event triggered above, everything is now in order
|
||||||
// Fire an inner synthetic event with the original arguments
|
// Fire an inner synthetic event with the original arguments
|
||||||
} else if ( saved.length ) {
|
} else if ( saved ) {
|
||||||
|
|
||||||
// ...and capture the result
|
// ...and capture the result
|
||||||
dataPriv.set( this, type, jQuery.event.trigger(
|
dataPriv.set( this, type, jQuery.event.trigger(
|
||||||
|
Loading…
Reference in New Issue
Block a user