From 7148e8bf6ef33ec4d21de2d4e9881b3279a28b2d Mon Sep 17 00:00:00 2001 From: Biser Stoilov Date: Sun, 18 Feb 2018 15:26:04 +0200 Subject: [PATCH] Update attach-form.js --- lib/proto/attach-form.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/proto/attach-form.js b/lib/proto/attach-form.js index 7741027..ccdd4eb 100644 --- a/lib/proto/attach-form.js +++ b/lib/proto/attach-form.js @@ -50,19 +50,16 @@ var formAction = function(el, event) { // jscs:disable disallowImplicitTypeConversion if (!!element.name && element.attributes !== undefined && element.tagName.toLowerCase() !== "button") { // jscs:enable disallowImplicitTypeConversion - var elementType + var elementType = "undef" if (element.tagName.toLowerCase() === "input") { if (element.type === "checkbox") { elementType = "checkbox" } - if (element.type === "radio") { + else if (element.type === "radio") { elementType = "radio" } - else { - elementType = "other" - } } - if (element.tagName.toLowerCase() === "select") { + else if (element.tagName.toLowerCase() === "select") { elementType = "select" } if ((elementType !== "checkbox" && elementType !== "radio") || element.checked) {