mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
use ?.
This commit is contained in:
parent
cf898ff7d1
commit
2fc747419d
|
@ -56,11 +56,8 @@ export abstract class TypeScriptBaseCodeLensProvider implements vscode.CodeLensP
|
|||
return [];
|
||||
}
|
||||
|
||||
const tree = response.body;
|
||||
const referenceableSpans: vscode.Range[] = [];
|
||||
if (tree && tree.childItems) {
|
||||
tree.childItems.forEach(item => this.walkNavTree(document, item, undefined, referenceableSpans));
|
||||
}
|
||||
response.body?.childItems?.forEach(item => this.walkNavTree(document, item, undefined, referenceableSpans));
|
||||
return referenceableSpans.map(span => new ReferencesCodeLens(document.uri, filepath, span));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue