Skip to content

Commit 3f8f022

Browse files
committed
Use destructuring to make code more clear
1 parent 8e5eed1 commit 3f8f022

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/vs/workbench/services/editor/common/editorOpenWith.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ export async function openEditorWith(
6262
// Prompt
6363
const resourceExt = extname(resource);
6464

65-
const items: (IQuickPickItem & { handler: IOpenEditorOverrideHandler })[] = allEditorOverrides.map((override) => {
65+
const items: (IQuickPickItem & { handler: IOpenEditorOverrideHandler })[] = allEditorOverrides.map(([handler, entry]) => {
6666
return {
67-
handler: override[0],
68-
id: override[1].id,
69-
label: override[1].label,
70-
description: override[1].active ? nls.localize('promptOpenWith.currentlyActive', 'Currently Active') : undefined,
71-
detail: override[1].detail,
67+
handler: handler,
68+
id: entry.id,
69+
label: entry.label,
70+
description: entry.active ? nls.localize('promptOpenWith.currentlyActive', 'Currently Active') : undefined,
71+
detail: entry.detail,
7272
buttons: resourceExt ? [{
7373
iconClass: 'codicon-settings-gear',
7474
tooltip: nls.localize('promptOpenWith.setDefaultTooltip', "Set as default editor for '{0}' files", resourceExt)

0 commit comments

Comments
 (0)