Closed
Description
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.
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