akerr501 / akerr501/CS361-Ethical-Eating-Project

Ingredients array is not validated before going to check ingredients page

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

On the build/edit recipe page, there is no validation to ensure that the array is not empty, or more specifically, that there is not any ingredient input that has no selection. To replicate this, click on the build recipe page on the navbar and immediately try to check ingredients without selecting an ingredient first. This will try to render a page of all the ingredients data, but there is no data to render so an error is instead thrown. A good solution would be to validate each ingredient input to ensure none of them are on "Select Ingredient", another possible solution would just to make sure that the array has at least one ingredient and just ignore the empty inputs as they will be forgotten after clicking the "Make swaps" button on the next page.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.