fix: prevent error when injecting empty theme CSS

This commit is contained in:
Hachi-R 2025-01-30 11:16:42 -03:00
parent 4758b8c05a
commit 4535ebc530

View file

@ -35,7 +35,10 @@ export const ThemeCard = ({ theme, onListUpdated }: ThemeCardProps) => {
}); });
} }
injectCustomCss(currentTheme.code); if (currentTheme.code) {
injectCustomCss(currentTheme.code);
}
await window.electron.updateCustomTheme(currentTheme.id, { await window.electron.updateCustomTheme(currentTheme.id, {
...currentTheme, ...currentTheme,
isActive: true, isActive: true,