From 998fa3b8d00e990cbf33e9b6cc5dce530493e7a4 Mon Sep 17 00:00:00 2001 From: Yakir Sitbon Date: Thu, 6 Dec 2012 17:19:48 +0200 Subject: [PATCH] Fxing step return "NaN" in quantity. --- assets/js/frontend/woocommerce.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/frontend/woocommerce.js b/assets/js/frontend/woocommerce.js index cdb8d0c4903..0168b4a7b5f 100644 --- a/assets/js/frontend/woocommerce.js +++ b/assets/js/frontend/woocommerce.js @@ -32,7 +32,7 @@ jQuery(document).ready(function($) { if ( ! currentVal || currentVal == "" || currentVal == "NaN" ) currentVal = 0; if ( max == "" || max == "NaN" ) max = ''; if ( min == "" || min == "NaN" ) min = 0; - if ( step == 'any' || step == "" || parseFloat( step ) == "NaN" ) step = 1; + if ( step == 'any' || step == "" || step == undefined || parseFloat( step ) == "NaN" ) step = 1; // Change the value if ( $(this).is('.plus') ) {