diff --git a/example/geny-window.js b/example/geny-window.js index 8d33b3d..408b479 100644 --- a/example/geny-window.js +++ b/example/geny-window.js @@ -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 = '';