mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Use .?method() in more places (#152112)
Switches simple patterns like:
```ts
if (some.thing) {
some.thing.method();
}
```
to:
```ts
some.thing?.method()
```
This is more concise and avoids having to repeat the `some.thing` part
This commit is contained in:
@@ -88,9 +88,7 @@ class DocumentSymbolAdapter {
|
||||
}
|
||||
const parent = parentStack[parentStack.length - 1];
|
||||
if (EditorRange.containsRange(parent.range, element.range) && !EditorRange.equalsRange(parent.range, element.range)) {
|
||||
if (parent.children) {
|
||||
parent.children.push(element);
|
||||
}
|
||||
parent.children?.push(element);
|
||||
parentStack.push(element);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user