Open smart--petea opened 10 years ago
if user will add to processingChaing a proc like
{
fn: function(){},
name: [],
}
with name=[]
then the expression
!chain[idx].names || ~chain[idx].names.indexOf(handler.name)
will be false. If to judge that name=[]
should match the case of general use then the expression from above must be true. Maybe to check that name are empty array. We obtain
!chain[idx].names || !chain[idx].names.length || ~chain[idx].names.indexOf(handler.name)
The expression
is equivalent to