Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/data/stores/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ theme.subscribe((value) => (localStorage.theme = value));

export const themeColors = derived(theme, ($theme) => {
const theme = config.themes.find((x) => x.name == $theme);
const colorSet = theme.colorSets.find((x) => x.type === 'main');
return colorSet.colors;
const colorSet = theme?.colorSets.find((x) => x.type === 'main');
return colorSet?.colors ?? {};
Comment thread
chrisvire marked this conversation as resolved.
});

export const themeBookColors = derived(theme, ($theme) => {
const theme = config.themes.find((x) => x.name == $theme);
const colorSet = theme.colorSets.find((x) => x.type === 'books');
return colorSet.colors;
const colorSet = theme?.colorSets.find((x) => x.type === 'books');
return colorSet?.colors ?? {};
});

export const monoIconColor = derived(theme, ($theme) => {
Expand Down