akerr501 / akerr501/CS361-Ethical-Eating-Project

Ingredients array is not validated before going to check ingredients page

Offen
#39 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
0
Forks
2
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.