Add space before parentheses of if condition for JS consistency

This commit is contained in:
Mehidi Hassan 2019-10-10 23:37:56 +06:00
parent badb135bd6
commit 3f8e3fdb2d
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@
.on( 'change', '#_sale_price.wc_input_price[type=text], .wc_input_price[name^=variable_sale_price]', function() {
var sale_price_field = $( this ), regular_price_field;
if( sale_price_field.attr( 'name' ).indexOf( 'variable' ) !== -1 ) {
if ( sale_price_field.attr( 'name' ).indexOf( 'variable' ) !== -1 ) {
regular_price_field = sale_price_field.parents( '.variable_pricing' ).find( '.wc_input_price[name^=variable_regular_price]' );
} else {
regular_price_field = $( '#_regular_price' );
@ -121,7 +121,7 @@
.on( 'keyup', '#_sale_price.wc_input_price[type=text], .wc_input_price[name^=variable_sale_price]', function() {
var sale_price_field = $( this ), regular_price_field;
if( sale_price_field.attr( 'name' ).indexOf( 'variable' ) !== -1 ) {
if ( sale_price_field.attr( 'name' ).indexOf( 'variable' ) !== -1 ) {
regular_price_field = sale_price_field.parents( '.variable_pricing' ).find( '.wc_input_price[name^=variable_regular_price]' );
} else {
regular_price_field = $( '#_regular_price' );