Skip to content

Commit cd277c8

Browse files
committed
fix input file iteration, closes #60
1 parent e84efe7 commit cd277c8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

FormData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if (typeof FormData === 'undefined' || !FormData.prototype.keys) {
123123
if (!elm.name || elm.disabled) continue
124124

125125
if (elm.type === 'file')
126-
for (let file of elm.files)
126+
for (let file of arrayFrom(elm.files || []))
127127
this.append(elm.name, file)
128128
else if (elm.type === 'select-multiple' || elm.type === 'select-one')
129129
for (let opt of arrayFrom(elm.options))

formdata.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "formdata-polyfill",
3-
"version": "3.0.11",
3+
"version": "3.0.12",
44
"description": "HTML5 `FormData` polyfill for Browsers.",
55
"main": "formdata.min.js",
66
"scripts": {

0 commit comments

Comments
 (0)