mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +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,
|
||||
theme: Theme
|
||||
): color is keyof SchemeColors {
|
||||
if (!theme || !theme.colors) return false;
|
||||
return color in theme.colors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user