mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +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