Skip to content

Commit

Permalink
Fixed allowing empty menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
Nailsonseat committed Feb 17, 2024
1 parent bce1c9c commit ecd1355
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/lib/provider/menu_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ class MenuStateNotifier extends StateNotifier<MenuState> {

void addMenuItem() {
String item = state.itemNameController.text;
if (item == '') {
return;
}
String weekday = getWeekDay(state.selectedWeekdayIndex);
String mealType = getMealType(state.selectedMealTypeIndex);

Expand Down

0 comments on commit ecd1355

Please sign in to comment.