Skip to content

Commit

Permalink
Empty the recipes list, before re-populating it with recipes.
Browse files Browse the repository at this point in the history
  • Loading branch information
caarmen committed Sep 26, 2024
1 parent 5f5460f commit 3c696e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/geny-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ const fetchRecipes = async () => {
}

const selectElement = document.querySelector('#listRecipes');
// Empty the select before adding new options.
selectElement.innerHTML = '';
const placeholderOption = document.createElement('option');
placeholderOption.textContent = 'Select a recipe';
placeholderOption.value = '';
Expand Down

0 comments on commit 3c696e1

Please sign in to comment.