Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround Minicolors problem with updating swatches
Minicolors can not handle when settings are updated with a shorter array of swatches than initially passed (see claviska/jquery-minicolors#287). Minicolors converts the swatch strings to object and stores the converted settings. When settings are updated, the new settings and the old are deeply merged. If the new settings contain less swatch colors, merging in the old settings adds a bunch of items to the swatches array that have already been converted to objects. When Minicolor proceeds to process the settings then, it cannot handle the already converted items in the swatches array. Minicolors stores its settings via `jQuery#data`. So before updating the settings, we now remove the `swatches` property from the stored settings. This way the settings object resulting from the deep merge will only contan the new swatch color values. REDMINE-17994
- Loading branch information