mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
editor: fix crash when theme.colors is undefined
This commit is contained in:
committed by
Abdullah Atta
parent
61b7e43d08
commit
f1d4fd1d5d
@@ -27,6 +27,7 @@ function isSchemeColor(
|
|||||||
color: string,
|
color: string,
|
||||||
theme: Theme
|
theme: Theme
|
||||||
): color is keyof SchemeColors {
|
): color is keyof SchemeColors {
|
||||||
|
if (!theme || !theme.colors) return false;
|
||||||
return color in theme.colors;
|
return color in theme.colors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user