Fix includes check on jsdoc patching (#169446)

This commit is contained in:
Matt Bierner
2022-12-16 14:36:22 -08:00
committed by GitHub
parent d74acc2714
commit c1498b35dd

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;