create recipeState and hydrate recipeconfig before recipe is constructed

This commit is contained in:
d98762625 2020-03-20 13:06:29 +00:00
parent 536a82684c
commit d491a7f0fc
5 changed files with 127 additions and 159 deletions

View file

@ -112,9 +112,9 @@ class Magic extends Operation {
options.forEach(option => {
// Construct recipe URL
// Replace this Magic op with the generated recipe
const recipeConfig = currentRecipeConfig.slice(0, this.state.progress)
const recipeConfig = currentRecipeConfig.slice(0, this.state.progress - 1)
.concat(option.recipe)
.concat(currentRecipeConfig.slice(this.state.progress + 1)),
.concat(currentRecipeConfig.slice(this.state.progress)),
recipeURL = "recipe=" + Utils.encodeURIFragment(Utils.generatePrettyRecipe(recipeConfig));
let language = "",