aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-04-03 18:21:15 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-04-03 18:21:30 +0200
commit9ab26aa508c6cca6afa9c6247ee6d50eaed2da77 (patch)
tree18ef501559698febcaebceae8f33853daa9cac3a
parent14685b318ae056cf9011ba2dcc73c077c3ae5a2d (diff)
downloadjquery-9ab26aa508c6cca6afa9c6247ee6d50eaed2da77.tar.gz
jquery-9ab26aa508c6cca6afa9c6247ee6d50eaed2da77.zip
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 (cherry picked from commit dfe212d5a1eed6b4a67d1cbd04ece09bbac33699)
-rw-r--r--src/event.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js
index 0b364d6d9..15818f3c0 100644
--- a/src/event.js
+++ b/src/event.js
@@ -570,7 +570,7 @@ function leverageNative( el, type, isSetup ) {
// If this is a native event triggered above, everything is now in order
// Fire an inner synthetic event with the original arguments
- } else if ( saved.length ) {
+ } else if ( saved ) {
// ...and capture the result
dataPriv.set( this, type, jQuery.event.trigger(