Skip to content

Commit

Permalink
Incorporating review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <[email protected]>
  • Loading branch information
tsmaeder committed Jul 14, 2021
1 parent 71ad85c commit c70655b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/plugin-ext/src/plugin/tasks/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ export class TasksExtImpl implements TasksExt {
if (!id) {
return undefined;
}
const result = this.providedCustomExecutions.get(id);
return result ? result : this.oneOffCustomExecutions.get(id);
return this.providedCustomExecutions.get(id) ?? this.oneOffCustomExecutions.get(id);
}

private addProvidedCustomExecution(execution: theia.CustomExecution): string {
Expand Down Expand Up @@ -207,7 +206,7 @@ export class TasksExtImpl implements TasksExt {
addedExecutions++;
}
return dto;
}).filter(task => !!task).map(task => task!);
}).filter((task): task is TaskDto => !!task);
} else {
return undefined;
}
Expand Down

0 comments on commit c70655b

Please sign in to comment.