diff --git a/src/main/java/no/ntnu/idatt1002/demo/controller/SuggestRecipesController.java b/src/main/java/no/ntnu/idatt1002/demo/controller/SuggestRecipesController.java index def104b710b607dd260986b058599157d9292c30..83e531dd39134a640ba47d108e68cf73da7cf1b1 100644 --- a/src/main/java/no/ntnu/idatt1002/demo/controller/SuggestRecipesController.java +++ b/src/main/java/no/ntnu/idatt1002/demo/controller/SuggestRecipesController.java @@ -73,7 +73,7 @@ public class SuggestRecipesController implements Initializable { Optional<ButtonType> clickedButton = dialog.showAndWait(); - if (clickedButton.get() == ButtonType.APPLY) { + if (clickedButton.isPresent() && clickedButton.get() == ButtonType.APPLY) { // Refresh ingredientsAtHand. ingredientsAtHand = FileHandler.readIngredientsAtHand("Fridge"); //TODO: Duplicate code and assertion. diff --git a/src/main/resources/recipes/Recipes.register b/src/main/resources/recipes/Recipes.register index 6c79274d143c81f5435e2f0448135266955f9e62..70dd0e992236fa32ae1c076af02b87a93c021a3b 100644 --- a/src/main/resources/recipes/Recipes.register +++ b/src/main/resources/recipes/Recipes.register @@ -1,4 +1,4 @@ -# Enkel pastasalat +# Simple Pasta Salad - PASTA | 300 | GR - OLIVE_OIL | 2 | TBS