Skip to content

Commit

Permalink
Use destructuring to make code more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Sep 10, 2020
1 parent 8e5eed1 commit 3f8f022
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vs/workbench/services/editor/common/editorOpenWith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ export async function openEditorWith(
// Prompt
const resourceExt = extname(resource);

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

0 comments on commit 3f8f022

Please sign in to comment.