Minor changes to pass automated npm test

This commit is contained in:
Peter Basham
2016-03-11 19:26:07 +00:00
parent 0b145bf936
commit 9b12b2b29e

View File

@@ -305,7 +305,7 @@ function calculateWeatherScale( adjustmentMethod, adjustmentOptions, weather ) {
// Zimmerman method // Zimmerman method
if ( adjustmentMethod === 1 ) { if ( adjustmentMethod === 1 ) {
var humidityBase, tempBase, precipBase; var humidityBase = 30, tempBase = 70, precipBase = 0;
// Check to make sure valid data exists for all factors // Check to make sure valid data exists for all factors
if ( !validateValues( [ "temp", "humidity", "precip" ], weather ) ) { if ( !validateValues( [ "temp", "humidity", "precip" ], weather ) ) {
@@ -314,9 +314,9 @@ function calculateWeatherScale( adjustmentMethod, adjustmentOptions, weather ) {
// Get baseline conditions for 100% water level, if provided // Get baseline conditions for 100% water level, if provided
if ( adjustmentOptions ) { if ( adjustmentOptions ) {
humidityBase = adjustmentOptions.hasOwnProperty( "bh" ) ? adjustmentOptions.bh : 30; humidityBase = adjustmentOptions.hasOwnProperty( "bh" ) ? adjustmentOptions.bh : humidityBase;
tempBase = adjustmentOptions.hasOwnProperty( "bt" ) ? adjustmentOptions.bt : 70; tempBase = adjustmentOptions.hasOwnProperty( "bt" ) ? adjustmentOptions.bt : tempBase;
precipBase = adjustmentOptions.hasOwnProperty( "br" ) ? adjustmentOptions.br : 0; precipBase = adjustmentOptions.hasOwnProperty( "br" ) ? adjustmentOptions.br : precipBase;
} }
var temp = ( ( weather.maxTemp + weather.minTemp ) / 2 ) || weather.temp, var temp = ( ( weather.maxTemp + weather.minTemp ) / 2 ) || weather.temp,