Skip to content

Commit

Permalink
Fix iterable() return value
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jul 9, 2019
1 parent a2e10c2 commit 37c0029
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const each = function(...inputs) {
const inputsB = inputsA.map(normalizeInput)

// eslint-disable-next-line fp/no-loops
for (const [info, values] of forEachLoop(inputsB)) {
for (const [info, ...values] of forEachLoop(inputsB)) {
// The `title`, `titles`, etc. are passed as first argument (not the last
// one) so that:
// - user can put `params` in an array (if needs be) using variadic
Expand Down Expand Up @@ -58,7 +58,7 @@ const forEachLoop = function*(inputs) {
index += 1

const { values, ...info } = normalizeLoop(loop, index)
yield [info, values]
yield [info, ...values]
}
}

Expand Down

0 comments on commit 37c0029

Please sign in to comment.