Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Mar 11, 2015
1 parent 3d4080d commit ddd8716
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
@@ -1,3 +1,8 @@
# 1.2.1 / 2015-03-11

Fixed: Ignore any `<fieldset>` elements which appear in `form.elements`
[[sixsided](https://github.com/sixsided)]

# 1.2.0 / 2015-03-05

Changed: Return a `File` object for `<input type="file">` where supported, or a
Expand Down
7 changes: 4 additions & 3 deletions dist/get-form-data.js
@@ -1,5 +1,5 @@
/*!
* get-form-data 1.2.0 - https://github.com/insin/get-form-data
* get-form-data 1.2.1 - https://github.com/insin/get-form-data
* MIT Licensed
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.getFormData=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
Expand All @@ -11,10 +11,11 @@ var NODE_LIST_CLASSES = {
, '[object RadioNodeList]': true
}

var BUTTON_INPUT_TYPES = {
var IGNORED_INPUT_TYPES = {
'button': true
, 'reset': true
, 'submit': true
, 'fieldset': true
}

var CHECKED_INPUT_TYPES = {
Expand Down Expand Up @@ -50,7 +51,7 @@ function getFormData(form, options) {
// Get unique submittable element names for the form
for (var i = 0, l = form.elements.length; i < l; i++) {
var element = form.elements[i]
if (BUTTON_INPUT_TYPES[element.type] || element.disabled) {
if (IGNORED_INPUT_TYPES[element.type] || element.disabled) {
continue
}
elementName = element.name || element.id
Expand Down
4 changes: 2 additions & 2 deletions dist/get-form-data.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -177,4 +177,4 @@ function getFormElementValue(element, trim) {

getFormData.getNamedFormElementData = getNamedFormElementData

module.exports = getFormData
module.exports = getFormData
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "get-form-data",
"version": "1.2.0",
"version": "1.2.1",
"description": " Gets form data via form.elements",
"main": "./lib/index.js",
"standalone": "getFormData",
Expand Down

0 comments on commit ddd8716

Please sign in to comment.