Yevgenium/weather-chart-card

Blank chart and error in console after some time

j4c3 opened this issue · 1 comments

j4c3 commented

If HA is left running in a browser window, returning to a view with the weather-chart-card often results in it being empty. The following error is logged in the console:

weather-chart-card.js:14885 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'datetime') at WeatherChartCard.drawChart (weather-chart-card.js:14885:33) at WeatherChartCard.firstUpdated (weather-chart-card.js:14855:12) at WeatherChartCard._$AE (weather-chart-card.js:314:5153) at WeatherChartCard.performUpdate (weather-chart-card.js:314:4954) at WeatherChartCard.scheduleUpdate (weather-chart-card.js:314:4535) at WeatherChartCard._$E_ (weather-chart-card.js:314:4443) at async WeatherChartCard._$E_ (weather-chart-card.js:314:4385)

I'm not sure yet how long, or what else is happening to cause it.

I updated the version of chart.js from 3.5.1 to 3.9.1 in the weather-chart-card and now it renders correctly in Firefox. I've submitted a pull request, but in the meantime you can get my fixed version at https://github.com/greendog99/weather-chart-card/releases