Check for code in palette before accessing background

Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
This commit is contained in:
Jonathan Roebuck
2024-10-03 16:47:43 +01:00
parent b672693280
commit 9b57739ce9
3 changed files with 1 additions and 5 deletions
-2
View File
@@ -313,7 +313,6 @@ export const palettes: {
tabbar: {
indicator: string;
};
code: {};
};
dark: {
type: 'dark';
@@ -388,7 +387,6 @@ export const palettes: {
tabbar: {
indicator: string;
};
code: {};
};
};
-2
View File
@@ -89,7 +89,6 @@ export const palettes = {
tabbar: {
indicator: '#9BF0E1',
},
code: {},
},
dark: {
type: 'dark' as const,
@@ -164,6 +163,5 @@ export const palettes = {
tabbar: {
indicator: '#9BF0E1',
},
code: {},
},
};
@@ -109,7 +109,7 @@ export default ({ theme }: RuleOptions) => `
/* CODE */
--md-code-fg-color: ${theme.palette.text.primary};
--md-code-bg-color: ${
theme.palette.code.background || theme.palette.background.paper
theme.palette.code?.background ?? theme.palette.background.paper
};
--md-code-hl-color: ${alpha(theme.palette.warning.main, 0.5)};
--md-code-hl-color--light: var(--md-code-hl-color);