Use includes instead of indexOf (#167778)

This commit is contained in:
Raymond Zhao
2022-11-30 14:44:10 -08:00
committed by GitHub
parent 2a16bdb467
commit 968026a46d
2 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
private provideCompletionItemsInternal(document: vscode.TextDocument, position: vscode.Position, context: vscode.CompletionContext): Thenable<vscode.CompletionList | undefined> | undefined {
const emmetConfig = vscode.workspace.getConfiguration('emmet');
const excludedLanguages = emmetConfig['excludeLanguages'] ? emmetConfig['excludeLanguages'] : [];
if (excludedLanguages.indexOf(document.languageId) > -1) {
if (excludedLanguages.includes(document.languageId)) {
return;
}