diff options
| author | misskey-release-bot[bot] <157398866+misskey-release-bot[bot]@users.noreply.github.com> | 2026-03-05 10:56:50 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 10:56:50 +0000 |
| commit | fe3dd8edb5f30104cd0a7ed755eb254feda2922d (patch) | |
| tree | af6cf5fa4ca75302ac2de5db742cead00bc13d21 /packages/frontend/src/theme.ts | |
| parent | Merge pull request #16998 from misskey-dev/develop (diff) | |
| parent | Release: 2026.3.0 (diff) | |
| download | misskey-fe3dd8edb5f30104cd0a7ed755eb254feda2922d.tar.gz misskey-fe3dd8edb5f30104cd0a7ed755eb254feda2922d.tar.bz2 misskey-fe3dd8edb5f30104cd0a7ed755eb254feda2922d.zip | |
Merge pull request #17217 from misskey-dev/develop
Release: 2026.3.0
Diffstat (limited to 'packages/frontend/src/theme.ts')
| -rw-r--r-- | packages/frontend/src/theme.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/theme.ts b/packages/frontend/src/theme.ts index e001bed8f3..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 @@ -232,7 +232,7 @@ export function parseThemeCode(code: string): Theme { try { theme = JSON5.parse(code); - } catch (err) { + } catch (_) { throw new Error('Failed to parse theme json'); } if (!validateTheme(theme)) { @@ -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); } |