mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
Verified null checker
This commit is contained in:
@@ -48,7 +48,7 @@ export const getColors = (
|
||||
const defaultColor = paletteToMui(palette.aGray);
|
||||
const key = option.toLocaleLowerCase().replace(" ", "_").trim();
|
||||
const color = list.find((opt: IColors) => opt.name === key);
|
||||
|
||||
// Null check in return
|
||||
return color || defaultColor;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user