Skip to content

Commit

Permalink
v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Apr 27, 2015
1 parent 5d32b5c commit 6ee2e6f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
@@ -1,3 +1,9 @@
# 1.2.2 / 2015-04-27

Fixed: Ignore form elements with empty names in `getFormData()`; don't throw on
empty element names in `getNamedFormElementData()`
[[#3](https://github.com/insin/get-form-data/issues/3)]

# 1.2.1 / 2015-03-11

Fixed: Ignore any `<fieldset>` elements which appear in `form.elements`
Expand Down
8 changes: 4 additions & 4 deletions dist/get-form-data.js
@@ -1,8 +1,8 @@
/*!
* get-form-data 1.2.1 - https://github.com/insin/get-form-data
* get-form-data 1.2.2 - 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){
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getFormData = f()}})(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){
'use strict';

var NODE_LIST_CLASSES = {
Expand Down Expand Up @@ -55,7 +55,7 @@ function getFormData(form, options) {
continue
}
elementName = element.name || element.id
if (!elementNameLookup[elementName]) {
if (elementName && !elementNameLookup[elementName]) {
elementNames.push(elementName)
elementNameLookup[elementName] = true
}
Expand Down Expand Up @@ -85,7 +85,7 @@ function getNamedFormElementData(form, elementName, options) {
if (!form) {
throw new Error('A form is required by getNamedFormElementData, was given form=' + form)
}
if (!elementName) {
if (!elementName && toString.call(elementName) !== '[object String]') {
throw new Error('A form element name is required by getNamedFormElementData, was given elementName=' + elementName)
}

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.

4 changes: 2 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "get-form-data",
"version": "1.2.1",
"description": " Gets form data via form.elements",
"version": "1.2.2",
"description": "Gets form data via form.elements",
"main": "./lib/index.js",
"standalone": "getFormData",
"homepage": "https://github.com/insin/get-form-data",
Expand Down

0 comments on commit 6ee2e6f

Please sign in to comment.