There is an issue with "addRandomColor" method inside NewPaletteForm.js.
Required conditions:
- User deleted all palettes but first one ("Material UI Colors"), which has only 19 colors or less;
- User is adding colors to new palette with "random color" button only.
This will lead to situation, when there is no any unique color left (we need at least 20 unique colors to fill whole palette using "random color" button), "isDuplicateColor" will be truthful forever, while loop will run infinitely.
To fix that we need to store somewhere at least 20 unique colors at any point of time, even when there will be less than 20 colors in user's palettes, so those colors would always be available for "addRandomColor" method.
There is an issue with "addRandomColor" method inside NewPaletteForm.js.
Required conditions:
This will lead to situation, when there is no any unique color left (we need at least 20 unique colors to fill whole palette using "random color" button), "isDuplicateColor" will be truthful forever, while loop will run infinitely.
To fix that we need to store somewhere at least 20 unique colors at any point of time, even when there will be less than 20 colors in user's palettes, so those colors would always be available for "addRandomColor" method.