Change reply to 100% when invalid data is recieved

This commit is contained in:
Samer Albahra
2015-07-08 00:21:14 -05:00
parent 800aab8251
commit 44c14aa53e

View File

@@ -194,7 +194,7 @@ function calculateWeatherScale( adjustmentMethod, adjustmentOptions, weather ) {
// Check to make sure valid data exists for all factors
if ( !validateValues( [ "temp", "humidity", "precip" ], weather ) ) {
return -1;
return 100;
}
var temp = ( ( weather.maxTemp + weather.minTemp ) / 2 ) || weather.temp,