Skip to content

Commit ada4d71

Browse files
committed
fix(shiki): prevent change side effect
1 parent 150e2d4 commit ada4d71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/highlighter/shiki.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export function createShikiHighlighter({
9999
codeToHastOptions.grammarContextCode = '<template>'
100100
}
101101

102-
const themesObject = typeof theme === 'string' ? { default: theme } : (theme || {})
102+
const themesObject = { ...(typeof theme === 'string' ? { default: theme } : (theme || {})) }
103103
const loadedThemes = shiki.getLoadedThemes()
104104
const loadedLanguages = shiki.getLoadedLanguages()
105105

0 commit comments

Comments
 (0)