File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1159,15 +1159,19 @@ function readApiBaker(options = {}) {
11591159 }
11601160 if ( forecast . pm25 !== undefined ) {
11611161 masterData . master_pm25 . push ( forecast . pm25 ) ;
1162- if ( forecast . pm25_aqi !== undefined ) {
1162+ if ( forecast . pm25_aqi !== undefined && forecast . pm25_aqi !== null ) {
11631163 masterData . master_pm25_aqi . push ( forecast . pm25_aqi ) ;
1164- } else {
1164+ } else if ( forecast . pm25 !== undefined && forecast . pm25 !== null ) {
11651165 masterData . master_pm25_aqi . push ( calculateAqiForPm25 ( forecast . pm25 ) ) ;
1166+ } else {
1167+ masterData . master_pm25_aqi . push ( 'N/A' ) ;
11661168 }
1167- if ( forecast . pm25_conc_cnn !== undefined ) {
1169+ if ( forecast . pm25_conc_cnn !== undefined && forecast . pm25_conc_cnn !== null ) {
11681170 masterData . master_pm25_conc_cnn . push ( forecast . pm25_conc_cnn ) ;
1169- } else {
1171+ } else if ( forecast . pm25 !== undefined && forecast . pm25 !== null ) {
11701172 masterData . master_pm25_conc_cnn . push ( forecast . pm25 ) ;
1173+ } else {
1174+ masterData . master_pm25_conc_cnn . push ( 'N/A' ) ;
11711175 }
11721176 }
11731177
You can’t perform that action at this time.
0 commit comments