We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5d7097 commit 714c1efCopy full SHA for 714c1ef
ui/src/utils/colors.ts
@@ -45,6 +45,10 @@ export const antdColorNames = PresetColors
45
* @description This function generates a hash from the input string and maps it to one of the predefined Ant Design color names.
46
*/
47
export const getColorForString = (string: string): string => {
48
+ // if its not a string or empty, return dark gray
49
+ if (typeof string !== 'string' || !string) {
50
+ return antdColors.darkGray
51
+ }
52
if (!string) {
53
return antdColors.darkGray
54
}
0 commit comments