diff --git a/packages/editor/src/toolbar/components/icon.tsx b/packages/editor/src/toolbar/components/icon.tsx index d5ab84d95..61d347f2c 100644 --- a/packages/editor/src/toolbar/components/icon.tsx +++ b/packages/editor/src/toolbar/components/icon.tsx @@ -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; }