diff options
Diffstat (limited to 'packages/frontend/src/theme.ts')
| -rw-r--r-- | packages/frontend/src/theme.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/theme.ts b/packages/frontend/src/theme.ts index a7012a7586..af47402bd6 100644 --- a/packages/frontend/src/theme.ts +++ b/packages/frontend/src/theme.ts @@ -204,7 +204,7 @@ export function compile(theme: Theme): Record<string, string> { return tinycolor(val); } - const props = {}; + const props = {} as Record<string, string>; for (const [k, v] of Object.entries(theme.props)) { if (k.startsWith('$')) continue; // ignore const @@ -247,12 +247,12 @@ export function parseThemeCode(code: string): Theme { export function previewTheme(code: string): void { const theme = parseThemeCode(code); - if (theme) applyTheme(theme, false); + if (theme != null) applyTheme(theme, false); } export async function installTheme(code: string): Promise<void> { const theme = parseThemeCode(code); - if (!theme) return; + if (theme == null) return; await addTheme(theme); } |