Bypass inputs without name

This commit is contained in:
Salva Machí 2020-01-13 11:31:20 +01:00
parent 2ca6c12089
commit d1dc5f8c20
1 changed files with 5 additions and 0 deletions

View File

@ -454,6 +454,11 @@ jQuery( function( $ ) {
var $input = $(elem);
// Bypass inputs without name att
if (!elem.name) {
return;
}
// Bypass non-checked checkboxes and radio buttons.
if (($input.is(':radio') || $input.is(':checkbox')) && !$input.is(':checked')) {
return;