Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Feb 7, 2024
1 parent abe18c4 commit b31d793
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,13 @@ function fastifyMultipart (fastify, options, done) {
}

const handle = (handler) => {
if (values.length === 0) {
if (values.length > 0) {
const value = values[0]
values = values.slice(1)
handler(value)
} else {
pendingHandler = handler
return
}

const value = values[0]
values = values.slice(1)
handler(value)
}

const parts = () => {
Expand Down

0 comments on commit b31d793

Please sign in to comment.