File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 5959 checkAQI ( ( ) => this . emit ( "redraw" ) ) ;
6060 let aqi = data [ config . rows [ id ] . url ]
6161 let txt = "" ;
62+ let aqius = ( aqi && typeof ( aqi . aqius ) == "number" ) ? aqi . aqius : "..." ;
63+ let temp = ( aqi && typeof ( aqi . temp ) == "number" ) ? aqi . temp : "..." ;
6264 switch ( config . rows [ id ] . mode ) {
6365 case 2 :
64- txt = ( ( aqi && aqi . aqius ) || "..." ) + " " + ( ( aqi && aqi . temp ) || "..." ) + "°" ;
66+ txt = aqius + " " + temp + "°" ;
6567 break ;
6668 case 3 :
67- txt = row . name + " " + ( ( aqi && aqi . aqius ) || "..." ) ;
69+ txt = row . name + " " + aqius ;
6870 break ;
6971 case 4 :
70- txt = row . name + " " + ( ( aqi && aqi . aqius ) || "..." ) + " " + ( ( aqi && aqi . temp ) || "..." ) + "°" ;
72+ txt = row . name + " " + aqius + " " + temp + "°" ;
7173 break ;
7274 case 5 :
7375 txt = row . name ;
7476 break ;
7577 default :
76- txt = ( ( aqi && aqi . aqius ) || "..." ) ;
78+ txt = aqius ;
7779 }
7880 return {
7981 text : txt ,
80- short : ( ( aqi && aqi . aqius ) || "..." ) ,
82+ short : aqius ,
8183 img : atob ( "GBiBAAA4AAB8AAd+AA++QB/d8D/t8D/p+DvqcBUPsA7vgB9fwA7vgAXvgAH/AAHwgAD3wAbfwA9/wA+/gA/fAA/OAA/gAAfAAAAAAA==" )
8284 } ;
8385 }
You can’t perform that action at this time.
0 commit comments