Fix check for radio and checkbox inputs
This commit is contained in:
@@ -50,7 +50,7 @@ var formAction = function(el, event) {
|
|||||||
// jscs:disable disallowImplicitTypeConversion
|
// jscs:disable disallowImplicitTypeConversion
|
||||||
if (!!element.name && element.attributes !== undefined && element.tagName.toLowerCase() !== "button") {
|
if (!!element.name && element.attributes !== undefined && element.tagName.toLowerCase() !== "button") {
|
||||||
// jscs:enable disallowImplicitTypeConversion
|
// jscs:enable disallowImplicitTypeConversion
|
||||||
if ((element.attributes.type !== "checkbox" && element.attributes.type !== "radio") || element.checked) {
|
if ((!element.attributes.type || element.attributes.type.value !== "checkbox" && element.attributes.type.value !== "radio") || element.checked) {
|
||||||
paramObject.push({name: encodeURIComponent(element.name), value: encodeURIComponent(element.value)})
|
paramObject.push({name: encodeURIComponent(element.name), value: encodeURIComponent(element.value)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user