From a8827dbb969b5328c7471649bd5aad56d9a8187b Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Thu, 30 Jul 2015 22:30:48 -0700 Subject: [PATCH] Use the correct adjustmentOption for auto rain delay --- routes/weather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/weather.js b/routes/weather.js index b811ea7..6f6d931 100644 --- a/routes/weather.js +++ b/routes/weather.js @@ -348,7 +348,7 @@ exports.getWeather = function( req, res ) { // If it is raining and the user has weather-based rain delay as the adjustment method then apply the specified delay if ( adjustmentMethod === 2 ) { - rainDelay = ( adjustmentOptions && adjustmentOptions.hasOwnProperty( "r" ) ) ? adjustmentOptions.r : 1440; + rainDelay = ( adjustmentOptions && adjustmentOptions.hasOwnProperty( "d" ) ) ? adjustmentOptions.d : 1440; } else { // For any other adjustment method, apply a scale of 0 (as the scale will revert when the rain stops)