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
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:
Expected output:
a bActual output:
aLink to test case
https://jsbin.com/voxetucoho/edit?js,console