If I dynamically change a custom icon (themeIcon), the class would be appended instead of replaced. This is because we only set the class to true via classes[value] = true; but never delete the old classes that are no longer passed as arguments. To fix this, I just replace the classes object with a new one.
If I dynamically change a custom icon (themeIcon), the class would be appended instead of replaced. This is because we only set the class to
true
viaclasses[value] = true;
but never delete the old classes that are no longer passed as arguments. To fix this, I just replace the classes object with a new one.Example before change of pinnedState
Example wrong
Example correct