Skip to content

Commit f11045a

Browse files
committed
yarn upgrade
Recurrent upgrade of the dependencies. - Fixed an issue cause by refined typings in `@theia/monaco`, the GrammarRegistry seems to return `null` now in some cases. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
1 parent b631dfc commit f11045a

File tree

2 files changed

+942
-886
lines changed

2 files changed

+942
-886
lines changed

packages/monaco/src/browser/textmate/monaco-textmate-service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ export class MonacoTextmateService implements FrontendApplicationContribution {
150150
await this.onigasmPromise;
151151
try {
152152
const grammar = await this.grammarRegistry.loadGrammarWithConfiguration(scopeName, initialLanguage, configuration);
153+
if (!grammar) {
154+
throw new Error(`no grammar for ${scopeName}, ${initialLanguage}, ${JSON.stringify(configuration)}`);
155+
}
153156
const options = configuration.tokenizerOption ? configuration.tokenizerOption : TokenizerOption.DEFAULT;
154157
monaco.languages.setTokensProvider(languageId, createTextmateTokenizer(grammar, options));
155158
} catch (error) {

0 commit comments

Comments
 (0)