mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +01:00
Fixes commit reveal bug
This commit is contained in:
parent
74aea25605
commit
dd59f90b15
1 changed files with 10 additions and 1 deletions
|
|
@ -59,7 +59,16 @@ export async function getVsCodeCommitId(
|
|||
monacoEditorVersion: string
|
||||
): Promise<string | undefined> {
|
||||
// TODO https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}/package.json
|
||||
return knownVersionVsCodeCommitIds[monacoEditorVersion];
|
||||
let commitId = knownVersionVsCodeCommitIds[monacoEditorVersion];
|
||||
if (!commitId) {
|
||||
const json = (await (
|
||||
await fetch(
|
||||
`https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}}/package.json`
|
||||
)
|
||||
).json()) as { vscodeCommitId: string };
|
||||
commitId = json.vscodeCommitId;
|
||||
}
|
||||
return commitId;
|
||||
}
|
||||
|
||||
const knownVersionVsCodeCommitIds: Record<string, string> = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue