]> source.dussan.org Git - jquery.git/commitdiff
Effect: Fix a unnecessary conditional statement in .stop()
authorWonseop Kim <wonseop.kim@samsung.com>
Wed, 1 May 2019 12:57:55 +0000 (21:57 +0900)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Wed, 25 Sep 2019 23:14:38 +0000 (01:14 +0200)
Because of the above conditional, the 'type' variable has a value of type
'string' or undefined. Therefore, boolean comparisons for 'type' variable
is always unnecessary because it return true. The patch removed the
unnecessary conditional statement.

Fixes gh-4374
Closes gh-4375

(cherry picked from commit 110802c7f22b677ef658963aa95ebdf5cb9c5573)

src/effects.js

index a778de106ac1c2048537334f19e45bf77e3a8b33..4ace4cafaf5a2b78080c9ccb771347adf0c6b8de 100644 (file)
@@ -542,7 +542,7 @@ jQuery.fn.extend( {
                        clearQueue = type;
                        type = undefined;
                }
-               if ( clearQueue && type !== false ) {
+               if ( clearQueue ) {
                        this.queue( type || "fx", [] );
                }