Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Apr 20, 2018
1 parent a1914b6 commit ebf2986
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/ts/search-plugins/programs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ export class ProgramsPlugin implements SearchPlugin {
}

public getAllItems(): SearchResultItem[] {
const result = [] as SearchResultItem[];

for (const program of this.programs) {
result.push({
return this.programs.map((program): SearchResultItem => {
return {
executionArgument: program.executionArgument,
icon: this.iconManager.getProgramIcon(),
name: program.name,
tags: [],
} as SearchResultItem);
}

return result;
} as SearchResultItem;
});
}
}

0 comments on commit ebf2986

Please sign in to comment.