akerr501 / akerr501/CS361-Ethical-Eating-Project

Ingredients array is not validated before going to check ingredients page

Aperta
#39 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
0
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.