Skip to content

Commit

Permalink
Fixed issue where AQHI range had no upper value
Browse files Browse the repository at this point in the history
  • Loading branch information
hongkongkiwi committed Jun 16, 2016
1 parent 6f2c406 commit 33895cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ HongKongPollution.prototype.getForecast = function() {
Upper: currentReport.AQHIRange.split(" to ")[1]
}
};
if (!currentReport.AQHIRange.hasOwnProperty("Upper") || !currentReport.AQHIRange.Upper) {
currentReport.AQHIRange.Upper = currentReport.AQHIRange.Lower;
}
callback(null, currentReport);
}, function(err, currentReports) {
forecast.data.CurrentAQHIReport = currentReports;
Expand Down

0 comments on commit 33895cf

Please sign in to comment.