diff --git a/js-tests/build/specs.js b/js-tests/build/specs.js index dcbb14ac..9d71235d 100644 --- a/js-tests/build/specs.js +++ b/js-tests/build/specs.js @@ -833,7 +833,6 @@ Shortcode = Backbone.Model.extend({ this.get( 'attrs' ).each( function( attr ) { - console.log( attr.get('attr'), attr.get('value') ); // Skip empty attributes. if ( ! attr.get( 'value' ) || attr.get( 'value' ).length < 1 ) { return; diff --git a/js/build/shortcode-ui.js b/js/build/shortcode-ui.js index 957a4005..9e48b6c2 100644 --- a/js/build/shortcode-ui.js +++ b/js/build/shortcode-ui.js @@ -279,7 +279,6 @@ Shortcode = Backbone.Model.extend({ this.get( 'attrs' ).each( function( attr ) { - console.log( attr.get('attr'), attr.get('value') ); // Skip empty attributes. if ( ! attr.get( 'value' ) || attr.get( 'value' ).length < 1 ) { return; @@ -1755,7 +1754,7 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( { var _selected = $( e.currentTarget ).val(); // Empty fields will have null values. We don't want to coerce that to the string "null". - if ( _selected == null ) { + if ( _selected === null ) { _selected = ''; } @@ -1764,7 +1763,6 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( { _selected = _selected.join( ',' ); } - this.setValue( String( _selected ) ); this.triggerCallbacks(); }, diff --git a/js/src/models/shortcode.js b/js/src/models/shortcode.js index 882cf2c6..e48afa8a 100644 --- a/js/src/models/shortcode.js +++ b/js/src/models/shortcode.js @@ -68,7 +68,6 @@ Shortcode = Backbone.Model.extend({ this.get( 'attrs' ).each( function( attr ) { - console.log( attr.get('attr'), attr.get('value') ); // Skip empty attributes. if ( ! attr.get( 'value' ) || attr.get( 'value' ).length < 1 ) { return; diff --git a/js/src/views/select2-field.js b/js/src/views/select2-field.js index 6eea89ac..706a809c 100644 --- a/js/src/views/select2-field.js +++ b/js/src/views/select2-field.js @@ -21,7 +21,7 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( { var _selected = $( e.currentTarget ).val(); // Empty fields will have null values. We don't want to coerce that to the string "null". - if ( _selected == null ) { + if ( _selected === null ) { _selected = ''; } @@ -30,7 +30,6 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( { _selected = _selected.join( ',' ); } - this.setValue( String( _selected ) ); this.triggerCallbacks(); },