mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-07-24 23:27:35 +00:00
fix(ui): retry deferred markdown renderer setup
This commit is contained in:
parent
de66b1349a
commit
5f144ca24d
2 changed files with 8 additions and 2 deletions
|
|
@ -13,7 +13,10 @@ let markdownModulePromise: Promise<MarkdownModule> | null = null
|
|||
|
||||
function loadMarkdownModule(): Promise<MarkdownModule> {
|
||||
if (!markdownModulePromise) {
|
||||
markdownModulePromise = import("../lib/markdown")
|
||||
markdownModulePromise = import("../lib/markdown").catch((error) => {
|
||||
markdownModulePromise = null
|
||||
throw error
|
||||
})
|
||||
}
|
||||
return markdownModulePromise
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,10 @@ async function getOrCreateHighlighter() {
|
|||
themes: ["github-light", "github-light-high-contrast", "github-dark"],
|
||||
langs: [],
|
||||
})
|
||||
})()
|
||||
})().catch((error) => {
|
||||
highlighterPromise = null
|
||||
throw error
|
||||
})
|
||||
|
||||
highlighter = await highlighterPromise
|
||||
highlighterPromise = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue