Skip to content

Commit

Permalink
chore: adjust type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Oct 31, 2024
1 parent 8299778 commit 8f05275
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/node/worker_shikiResolveLang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { runAsWorker } from 'synckit'

async function resolveLang(lang: string) {
return (
(bundledLanguages as Record<string, DynamicImportLanguageRegistration>)
(
bundledLanguages as Record<
string,
DynamicImportLanguageRegistration | undefined
>
)
[lang]?.()
.then((m) => m.default) || []
)
Expand Down

0 comments on commit 8f05275

Please sign in to comment.