Skip to content

Commit

Permalink
Fix bug; update package version to 3.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
FlameWolf committed Apr 8, 2024
1 parent d8b5b7a commit 5411c21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const formDataParser = async (instance, options) => {
const bus = busboy({ headers: message.headers, limits, defParamCharset: "utf8" });
bus.on("file", (name, stream, info) => {
results.push(storage.process(name, stream, info));
const fileProp = body[name];
let fileProp = body[name];
if (!fileProp) {
body[name] = JSON.stringify(info);
} else if (!Array.isArray(fileProp)) {
Expand Down Expand Up @@ -49,7 +49,7 @@ const formDataParser = async (instance, options) => {
for (const file of files) {
const field = file.field;
delete file.field;
const fileProp = newBody[field];
let fileProp = newBody[field];
if (!fileProp) {
newBody[field] = file;
} else if (!Array.isArray(fileProp)) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formzilla",
"version": "3.2.6",
"version": "3.2.7",
"description": "Fastify plugin for parsing multipart/form data",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 5411c21

Please sign in to comment.