mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Remove extra conditional
This commit is contained in:
parent
5e40bd7df9
commit
633e386b18
|
@ -75,13 +75,11 @@ class TypeScriptDocumentSymbolProvider implements vscode.DocumentSymbolProvider
|
|||
range,
|
||||
range);
|
||||
|
||||
if (item.childItems) {
|
||||
for (const child of children) {
|
||||
if (child.spans.some(span => !!range.intersection(typeConverters.Range.fromTextSpan(span)))) {
|
||||
const includedChild = TypeScriptDocumentSymbolProvider.convertNavTree(resource, symbolInfo.children, child);
|
||||
shouldInclude = shouldInclude || includedChild;
|
||||
children.delete(child);
|
||||
}
|
||||
for (const child of children) {
|
||||
if (child.spans.some(span => !!range.intersection(typeConverters.Range.fromTextSpan(span)))) {
|
||||
const includedChild = TypeScriptDocumentSymbolProvider.convertNavTree(resource, symbolInfo.children, child);
|
||||
shouldInclude = shouldInclude || includedChild;
|
||||
children.delete(child);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue