Skip to content

Commit 680e6ec

Browse files
committed
add: flatten arrays passed to sql.join
1 parent d6a8cb5 commit 680e6ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ function Postgres(a, b) {
320320
}
321321

322322
function join(sep, xs) {
323-
return xs.flatMap((x, i) => i ? [sep, x] : x)
323+
return xs.flatMap((x, i) => i ? Array.isArray(x) ? [sep, ...x] : [sep, x])
324324
}
325325

326326
function array(x, type) {

0 commit comments

Comments
 (0)