Fix includes check on jsdoc patching (#169446)

pull/169214/head
Matt Bierner 2022-12-16 14:36:22 -08:00 committed by GitHub
parent d74acc2714
commit c1498b35dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ function removeNodeTypes(grammar) {
function patchJsdoctype(grammar) {
grammar.repository['jsdoctype'].patterns = grammar.repository['jsdoctype'].patterns.filter(pattern => {
if (pattern.name && pattern.name.indexOf('illegal') >= -1) {
if (pattern.name && pattern.name.includes('illegal')) {
return false;
}
return true;