I found strange code in line 545 of 'src/effect.js'.
The variable 'type' in this code can not be false.
Therefore, it would be better to modify the conditional statement.
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
};
if ( typeof type !== "string" ) { // <-- Valiable 'type' has a string value or 'undefined'
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
}
if ( clearQueue && type !== false ) { // 'type !== false' is boolean check
// It should be compared with 'string' type or 'undefined'
this.queue( type || "fx", [] );
}
Link to test case
N/A
The text was updated successfully, but these errors were encountered:
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.
Fixesgh-4374Closesgh-4375
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.
Fixesgh-4374Closesgh-4375
(cherry picked from commit 110802c)
Description
I found strange code in line 545 of 'src/effect.js'.
The variable 'type' in this code can not be false.
Therefore, it would be better to modify the conditional statement.
Link to test case
N/A
The text was updated successfully, but these errors were encountered: