Skip to content

Commit

Permalink
revert: return default flavor if entity cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
azech-hqs committed Nov 10, 2022
1 parent 411b408 commit d7c6c18
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/executable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ export class Executable extends mix(NamedDefaultableInMemoryEntity).with(Runtime
}

getFlavorByName(name) {
let flavor = this.getEntityByName(this.flavors, "flavor", name);
if (!flavor) {
console.warn(`Could not find flavor '${name}'! Using default instead.`);
flavor = this.defaultFlavor;
}
return flavor;
return this.getEntityByName(this.flavors, "flavor", name);
}

getFlavorByConfig(config) {
Expand Down

0 comments on commit d7c6c18

Please sign in to comment.