diff --git a/spec/form_spec.cr b/spec/form_spec.cr index fb03481..f8c38f6 100644 --- a/spec/form_spec.cr +++ b/spec/form_spec.cr @@ -8,7 +8,7 @@ WebMock.stub(:get, "example.com/check_form").to_return(body: <<-BODY
- + diff --git a/src/mechanize/form.cr b/src/mechanize/form.cr index 49f3270..1edb015 100644 --- a/src/mechanize/form.cr +++ b/src/mechanize/form.cr @@ -65,7 +65,7 @@ class MechanizeCr::Form private def parse @node.css("input").not_nil!.each do |html_node| html_node = html_node.as(Lexbor::Node) - type = (html_node["type"] || "text").downcase + type = (html_node["type"]? || "text").downcase case type when "checkbox" checkboxes << FormContent::CheckBox.new(html_node, self)