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
@@ -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);