working on coding standards

This commit is contained in:
Matheus Lopes 2016-04-05 17:28:45 -03:00
parent 61b8fece41
commit ed754fb23f
1 changed files with 6 additions and 6 deletions

View File

@ -155,11 +155,11 @@ class WC_Admin_Taxonomies {
});
jQuery( document ).ajaxComplete( function( event, request, options ) {
if ( request && request.readyState === 4 && request.status === 200
&& options.data && options.data.indexOf('action=add-tag') >= 0 ) {
if ( request && 4 === request.readyState && 200 === request.status
&& options.data && 0 <= options.data.indexOf( 'action=add-tag' ) ) {
var res = wpAjax.parseAjaxResponse( request.responseXML, 'ajax-response' );
if ( !res || res.errors ) {
if ( ! res || res.errors ) {
return;
}
// Clear Thumbnail fields on submit
@ -170,7 +170,7 @@ class WC_Admin_Taxonomies {
jQuery( '#display_type' ).val( '' );
return;
}
});
} );
</script>
<div class="clear"></div>