Skip to content

Commit

Permalink
column options in openWith-command can be undefined, fyi @mjbvz
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Dec 1, 2020
1 parent 3472159 commit bf21395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/parts/editor/editorCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,13 @@ function registerOpenEditorAPICommands(): void {
}, viewColumnToEditorGroup(editorGroupService, column));
});

CommandsRegistry.registerCommand(API_OPEN_WITH_EDITOR_COMMAND_ID, (accessor: ServicesAccessor, resource: UriComponents, id: string, columnAndOptions: [EditorGroupColumn?, ITextEditorOptions?]) => {
CommandsRegistry.registerCommand(API_OPEN_WITH_EDITOR_COMMAND_ID, (accessor: ServicesAccessor, resource: UriComponents, id: string, columnAndOptions?: [EditorGroupColumn?, ITextEditorOptions?]) => {
const editorService = accessor.get(IEditorService);
const editorGroupsService = accessor.get(IEditorGroupsService);
const configurationService = accessor.get(IConfigurationService);
const quickInputService = accessor.get(IQuickInputService);

const [columnArg, optionsArg] = columnAndOptions;
const [columnArg, optionsArg] = columnAndOptions ?? [];
let group: IEditorGroup | undefined = undefined;

if (columnArg === SIDE_GROUP) {
Expand Down

0 comments on commit bf21395

Please sign in to comment.