From 0ec546427e508116d91779c01eb79b9560125420 Mon Sep 17 00:00:00 2001 From: Anh Hoang Nguyen Date: Tue, 6 Feb 2018 14:50:23 +0700 Subject: [PATCH] Catalog rows: cast min, max, and value to int --- includes/customizer/class-wc-shop-customizer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/customizer/class-wc-shop-customizer.php b/includes/customizer/class-wc-shop-customizer.php index cec363b22bc..6631483934e 100644 --- a/includes/customizer/class-wc-shop-customizer.php +++ b/includes/customizer/class-wc-shop-customizer.php @@ -154,8 +154,10 @@ class WC_Shop_Customizer { wp.customize( 'woocommerce_catalog_rows', function( setting ) { setting.bind( function( value ) { - var min = ''; - var max = ''; + var min = parseInt( '', 10 ); + var max = parseInt( '', 10 ); + + value = parseInt( value, 10 ); if ( max && value > max ) { setting.notifications.add( 'max_rows_error', new wp.customize.Notification(