Fix addition of new option in select field if there are no existing options (#6718)
Fixes [sentry](https://twenty-v7.sentry.io/issues/5745628875/?alert_rule_id=15135099&alert_type=issue¬ification_uuid=95108411-b431-4abd-bdd6-687c96a7353e&project=4507072563183616&referrer=discord)
This commit is contained in:
@ -20,4 +20,9 @@ describe('getNextThemeColor', () => {
|
||||
|
||||
expect(getNextThemeColor(currentColor)).toBe(nextColor);
|
||||
});
|
||||
it('returns the first color when currentColorIsUndefined', () => {
|
||||
const firstColor: ThemeColor = MAIN_COLOR_NAMES[0];
|
||||
|
||||
expect(getNextThemeColor(undefined)).toBe(firstColor);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user