Use ?.forEach instead of ( || []).forEach

This commit is contained in:
Matt Bierner
2022-02-28 13:52:59 -08:00
parent 6f63577e80
commit 1d77856203
3 changed files with 4 additions and 4 deletions

View File

@@ -72,6 +72,6 @@ export abstract class TypeScriptBaseCodeLensProvider implements vscode.CodeLensP
results.push(range);
}
(item.childItems || []).forEach(child => this.walkNavTree(document, child, item, results));
item.childItems?.forEach(child => this.walkNavTree(document, child, item, results));
}
}