The indexOf method returns the index of the first occurrence of the searched element, effectively removing duplicated classes that appear later. Modify it to use lastIndexOf instead, so that the earlier duplicated class gets removed, prioritizing the class appearing later.
fix #245
The
indexOf
method returns the index of the first occurrence of the searched element, effectively removing duplicated classes that appear later. Modify it to uselastIndexOf
instead, so that the earlier duplicated class gets removed, prioritizing the class appearing later.