Skip to content

Commit

Permalink
filter executables based on supported application versions in getExec…
Browse files Browse the repository at this point in the history
…utables
  • Loading branch information
pranabdas committed Jul 22, 2023
1 parent 85f8710 commit d6b1774
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,19 @@ export class Application extends NamedDefaultableInMemoryEntity {

get executables() {
const tree = getAppTree(this.prop("name"));
return Object.keys(tree).map((key) => {
const executableList = Object.keys(tree).map((key) => {
return new this.constructor.Executable({ ...tree[key], name: key });
});
const allowedExecutables = executableList.filter(
(exe) =>
!exe._json.supportedApplicationVersions ||
(exe._json.supportedApplicationVersions &&
exe._json.supportedApplicationVersions.includes(this.prop("version"))),
);
return allowedExecutables;
// return Object.keys(tree).map((key) => {
// return new this.constructor.Executable({ ...tree[key], name: key });
// });
}

get hasAdvancedComputeOptions() {
Expand Down

0 comments on commit d6b1774

Please sign in to comment.