From 36b7d6e8bc24533c9b649f3811949ee9f80f241b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 Nov 2021 10:03:32 +0100 Subject: [PATCH] Fixes microsoft/monaco-editor#2750 --- src/vs/editor/standalone/browser/standaloneLanguages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/standalone/browser/standaloneLanguages.ts b/src/vs/editor/standalone/browser/standaloneLanguages.ts index 1d8403c185bfc..14b5bbb886ad9 100644 --- a/src/vs/editor/standalone/browser/standaloneLanguages.ts +++ b/src/vs/editor/standalone/browser/standaloneLanguages.ts @@ -49,8 +49,8 @@ export function getEncodedLanguageId(languageId: string): number { * @event */ export function onLanguage(languageId: string, callback: () => void): IDisposable { - let disposable = StaticServices.modeService.get().onDidEncounterLanguage((languageId) => { - if (languageId === languageId) { + let disposable = StaticServices.modeService.get().onDidEncounterLanguage((encounteredLanguageId) => { + if (encounteredLanguageId === languageId) { // stop listening disposable.dispose(); // invoke actual listener