summaryrefslogtreecommitdiff
path: root/recipeBuddy/src
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-09 18:03:59 -0500
committerTucker Evans <tuckerevans24@gmail.com>2019-12-09 18:04:52 -0500
commite8d327e3783831107400456de84ecd79241b5773 (patch)
tree4dced79095b369c37954c06184b0410ae6db805d /recipeBuddy/src
parent24e9e8530fe5b7ee4a6da37b5da7a1b66eb5b467 (diff)
Fix array indexing of formData.steps
Diffstat (limited to 'recipeBuddy/src')
-rw-r--r--recipeBuddy/src/app/add-recipe/add-recipe.component.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
index 8f00146..e6555d4 100644
--- a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
+++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
@@ -102,9 +102,9 @@ export class AddRecipeComponent {
}
var steps = []
- for (i = 0; i < formData.ingredients.length; i++) {
- var tmp_timer = parseInt(formData.steps[0].timer)
- steps.push(new Step(formData.steps[0].instruct,
+ for (i = 0; i < formData.steps.length; i++) {
+ var tmp_timer = parseInt(formData.steps[i].timer)
+ steps.push(new Step(formData.steps[i].instruct,
(isNaN(tmp_timer) ? 0 : tmp_timer)
));
}