Skip to content

fix: prioritize shikiTheme prop over code plugin default theme#497

Open
sleitor wants to merge 2 commits intovercel:mainfrom
sleitor:fix-496
Open

fix: prioritize shikiTheme prop over code plugin default theme#497
sleitor wants to merge 2 commits intovercel:mainfrom
sleitor:fix-496

Conversation

@sleitor
Copy link
Copy Markdown
Contributor

@sleitor sleitor commented Apr 3, 2026

Fixes #496

The shikiTheme prop was being overridden by the code plugin's default theme due to incorrect nullish coalescing order. The prop should take priority over the plugin default, matching the documented behavior.\n\n### Changes\n- Swapped the nullish coalescing order so shikiTheme prop takes precedence over plugins?.code?.getThemes()

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 3, 2026

@sleitor is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Remove the destructuring default so shikiTheme can be undefined,
making plugins?.code?.getThemes() actually reachable as a fallback.
Priority chain: explicit prop > code plugin > defaultShikiTheme.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shikiTheme should prop have priority over the code plugin default theme

1 participant