Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
  • Loading branch information
vzhukovs committed Nov 12, 2019
1 parent eea47b6 commit e4e9ef0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ export function filterRecipeContainers(containers: WorkspaceContainer[]): Worksp
}

export function isDevContainer(container: WorkspaceContainer): boolean {
return container.attributes !== undefined
return container.attributes !== undefined
&& (!container.attributes[CONTAINER_SOURCE_ATTRIBUTE] || container.attributes[CONTAINER_SOURCE_ATTRIBUTE] === RECIPE_CONTAINER_SOURCE);
}
10 changes: 5 additions & 5 deletions plugins/task-plugin/src/machine/machines-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class MachinesPicker {
if (containerNames.length === 1) {
return Promise.resolve(containerNames[0]);
}
return this.showQuickPick(containerNames.map(containerName => ({label: containerName})));
return this.showQuickPick(containerNames.map(containerName => ({ label: containerName })));
}

private showQuickPick(items: QuickPickItem[]): Promise<string> {
Expand All @@ -44,9 +44,9 @@ export class MachinesPicker {
return;
}

window.showQuickPick(items, {
placeHolder: CONTAINERS_PLACE_HOLDER,
ignoreFocusOut: false,
window.showQuickPick(items, {
placeHolder: CONTAINERS_PLACE_HOLDER,
ignoreFocusOut: false,
onDidSelectItem: (item => {
resolve((<QuickPickItem>item).label);
})
Expand Down Expand Up @@ -90,7 +90,7 @@ export class MachinesPicker {
}

private isDevContainer(container: WorkspaceContainer): boolean {
return container.attributes !== undefined
return container.attributes !== undefined
&& (!container.attributes[CONTAINER_SOURCE_ATTRIBUTE] || container.attributes[CONTAINER_SOURCE_ATTRIBUTE] === RECIPE_CONTAINER_SOURCE);
}
}

0 comments on commit e4e9ef0

Please sign in to comment.