Skip to content

Commit

Permalink
add: flatten arrays passed to sql.join
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielFGray committed Jun 27, 2024
1 parent d6a8cb5 commit 680e6ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function Postgres(a, b) {
}

function join(sep, xs) {
return xs.flatMap((x, i) => i ? [sep, x] : x)
return xs.flatMap((x, i) => i ? Array.isArray(x) ? [sep, ...x] : [sep, x])
}

function array(x, type) {
Expand Down

0 comments on commit 680e6ec

Please sign in to comment.