Use includes instead of indexOf (#167860)

Use indexOf instead of includes
This commit is contained in:
Raymond Zhao 2022-12-01 16:17:10 -08:00 committed by GitHub
parent 5e74da62da
commit 5762c7821c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,7 +140,7 @@ function getNextAttribute(document: vscode.TextDocument, selectionStart: number,
}
// Fetch the next word in the attr value
if (attr.value.toString().indexOf(' ') === -1) {
if (!attr.value.toString().includes(' ')) {
// attr value does not have space, so no next word to find
continue;
}