mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +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
|
monacoEditorVersion: string
|
||||||
): Promise<string | undefined> {
|
): Promise<string | undefined> {
|
||||||
// TODO https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}/package.json
|
// TODO https://cdn.jsdelivr.net/npm/monaco-editor@${monacoEditorVersion}/package.json
|
||||||
let commitId = knownVersionVsCodeCommitIds[monacoEditorVersion];
|
let commitId: string | undefined =
|
||||||
|
knownVersionVsCodeCommitIds[monacoEditorVersion];
|
||||||
if (!commitId) {
|
if (!commitId) {
|
||||||
const json = (await (
|
const json = (await (
|
||||||
await fetch(
|
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;
|
commitId = json.vscodeCommitId;
|
||||||
}
|
}
|
||||||
return commitId;
|
return commitId;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue