From 4ee98c0f7c7685e542712e212b363f1c4f19d4b2 Mon Sep 17 00:00:00 2001 From: Carmen Alvarez Date: Thu, 26 Sep 2024 12:58:24 +0200 Subject: [PATCH] Remove the "No recipes fetched, give a valid api token" recipes select element, if we successfully retrieved the recipes. --- example/geny-window.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/geny-window.js b/example/geny-window.js index 8d33b3d..973aa5c 100644 --- a/example/geny-window.js +++ b/example/geny-window.js @@ -155,6 +155,8 @@ const fetchRecipes = async () => { } const selectElement = document.querySelector('#listRecipes'); + // Remove our "warning" select option about an invalid/missing api token. + selectElement.remove(0); const placeholderOption = document.createElement('option'); placeholderOption.textContent = 'Select a recipe'; placeholderOption.value = '';