Rewrote fallback icon function.

yahoo_weather
simon04 14 years ago
parent 232117f6b7
commit da6176cddb
  1. 9
      src/extension.js

@ -284,10 +284,11 @@ WeatherMenuButton.prototype = {
get_weather_icon_safely: function(code) { get_weather_icon_safely: function(code) {
let iconname = this.get_weather_icon(code); let iconname = this.get_weather_icon(code);
if (!this.has_icon(iconname[0]) && iconname.length > 1) for (let i = 0; i < iconname.length; i++) {
return iconname[1]; if (this.has_icon(iconname[i]))
else return iconname[i];
return iconname[0]; }
return 'weather-severe-alert';
}, },
has_icon: function(icon) { has_icon: function(icon) {

Loading…
Cancel
Save