Fix JSHint errors in the old XML-based ajax response JS.

props OriginalEXE.
fixes #25954.


git-svn-id: https://develop.svn.wordpress.org/trunk@26159 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-11-14 05:42:06 +00:00
parent efe54a3ac6
commit c0207f3bfb
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ var wpAjax = jQuery.extend( {
response.supplemental = {};
if ( !jQuery( 'supplemental', child ).children().each( function() {
response.supplemental[this.nodeName] = jQuery(this).text();
} ).size() ) { response.supplemental = false }
} ).size() ) { response.supplemental = false; }
response.errors = [];
if ( !jQuery('wp_error', child).each( function() {
var code = jQuery(this).attr('code'), anError, errorData, formField;
@ -54,7 +54,7 @@ var wpAjax = jQuery.extend( {
},
validateForm: function( selector ) {
selector = jQuery( selector );
return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() == ''; } ) ).size();
return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() === ''; } ) ).size();
}
}, wpAjax || { noPerm: 'You do not have permission to do that.', broken: 'An unidentified error has occurred.' } );