diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-10 15:04:51 -0500 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-10 15:04:51 -0500 |
commit | e249709c792bb7e819be661a134e3a965d2a0919 (patch) | |
tree | b4bf0db0f7b397a96a0832880dd81ff2cf1b4164 /recipeBuddy | |
parent | e8d327e3783831107400456de84ecd79241b5773 (diff) |
Fix blank tags/photos not added to Recipe
Diffstat (limited to 'recipeBuddy')
-rw-r--r-- | recipeBuddy/src/app/add-recipe/add-recipe.component.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts index e6555d4..5109c34 100644 --- a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts +++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts @@ -121,8 +121,8 @@ export class AddRecipeComponent { (isNaN(cookTimeTmp) ? 0 :cookTimeTmp), //cookTime 0, //timesCooked 0, //rating - formData.tags.split(','), //tags - formData.photos.split(',') //photos + formData.tags.split(',').filter(word=> !(word==="")), //tags + formData.photos.split(',').filter(word=> !(word==="")) //photos ); this.restService.createRecipe(recipe).subscribe(); this.router.navigate(['/']); |