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