diff --git a/src/features/Folding.ts b/src/features/Folding.ts index 2a793b00d7..105b85d1c2 100644 --- a/src/features/Folding.ts +++ b/src/features/Folding.ts @@ -545,8 +545,8 @@ export class FoldingFeature implements IFeature { // Branching for the different vscode-textmate modules if ("loadGrammarFromPathSync" in registry) { // V3 of the module allows synchronous loading of a grammar - return new Promise( (grammar) => { - return registry.loadGrammarFromPathSync(grammarPath); + return new Promise( (resolve) => { + resolve(registry.loadGrammarFromPathSync(grammarPath)); }); } else { // However in V4+ this is async only