Skip to content

Commit 79cb9f1

Browse files
clean up
1 parent 4d96f64 commit 79cb9f1

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

packages/cursorless-vscode/src/ScopeTreeProvider.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -213,22 +213,14 @@ export class ScopeTreeProvider implements TreeDataProvider<MyTreeItem> {
213213
function getSupportCategories(
214214
includeLegacy: boolean,
215215
): SupportCategoryTreeItem[] {
216-
return includeLegacy
217-
? [
218-
new SupportCategoryTreeItem(ScopeSupport.supportedAndPresentInEditor),
219-
new SupportCategoryTreeItem(
220-
ScopeSupport.supportedButNotPresentInEditor,
221-
),
222-
new SupportCategoryTreeItem(ScopeSupport.supportedLegacy),
223-
new SupportCategoryTreeItem(ScopeSupport.unsupported),
224-
]
225-
: [
226-
new SupportCategoryTreeItem(ScopeSupport.supportedAndPresentInEditor),
227-
new SupportCategoryTreeItem(
228-
ScopeSupport.supportedButNotPresentInEditor,
229-
),
230-
new SupportCategoryTreeItem(ScopeSupport.unsupported),
231-
];
216+
return [
217+
new SupportCategoryTreeItem(ScopeSupport.supportedAndPresentInEditor),
218+
new SupportCategoryTreeItem(ScopeSupport.supportedButNotPresentInEditor),
219+
...(includeLegacy
220+
? [new SupportCategoryTreeItem(ScopeSupport.supportedLegacy)]
221+
: []),
222+
new SupportCategoryTreeItem(ScopeSupport.unsupported),
223+
];
232224
}
233225

234226
class ScopeSupportTreeItem extends TreeItem {

0 commit comments

Comments
 (0)