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 Oct 4, 2021
1 parent f78bdeb commit 3d46c7e
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 @@ -75,8 +75,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 @@ -208,7 +207,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 3d46c7e

Please sign in to comment.