Skip to content

Commit

Permalink
Fix a !LW recipe not found fallback issue
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Nov 19, 2023
1 parent a8d808b commit 688746c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,11 @@ export class Builder {
}
// Find default recipe of last used
if (recipe === undefined && defaultRecipeName === 'lastUsed') {
recipe = this.prevRecipe
const candidates = recipes.filter(candidate => candidate.name === this.prevRecipe?.name)
if (candidates.length < 1) {
logger.log(`Failed to resolve previous build recipe: ${recipeName}.`)
}
recipe = candidates[0]
}
// If still not found, fallback to 'first'
if (recipe === undefined) {
Expand Down

0 comments on commit 688746c

Please sign in to comment.