GDGC-MET / Weather_App

A simple weather app that provides real-time weather information for any location using the OpenWeatherMap API.
https://gdgc-met.github.io/Weather_App/
MIT License
2 stars 31 forks source link

Error on Empty Input #31

Open Vansh1897 opened 5 days ago

Vansh1897 commented 5 days ago

Describe the bug When a city name is given as input, its showing the results but when we are clicking on the search button without giving any city name as input its just showing city as undefined but the temperature, humidity and wind speed information is just same as the previous city.

To Reproduce Steps to reproduce the behavior:

  1. Keep the searchbar empty.
  2. Click on search button.
  3. it will show the information of the previous city you have searched for.

Expected behavior it should clear all the data and display an error or just update all the information to 0 or null.

Desktop (please complete the following information):