diff --git a/script.js b/script.js index 168e3e9..0898eb8 100644 --- a/script.js +++ b/script.js @@ -147,6 +147,7 @@ window.onclick = function (event) { }; function forecastDetails(info) { + document.querySelector(".forecast").innerHTML = ""; if (info.error) { infoTxt.classList.replace("pending", "error"); infoTxt.innerText = `${inputField.value} isn't a valid city name`;