Closed
Description
Description
When addClass()
is called with an array, and one of the classes in the array is an empty string, it doesn't add all of the classes (it stops processing them after the empty string).
Minimal test case:
$( '<div>' ).addClass( [ 'a', '', 'b' ] ).attr( 'class' )
Expected output: a b
Actual output: a
Link to test case
https://jsbin.com/voxetucoho/edit?js,console