Skip to content

Commit c7dff0c

Browse files
committed
Fix array using map function
1 parent 32ab198 commit c7dff0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default function Postgres(url, options) {
202202
return {
203203
rows: typeof args[0] === 'string'
204204
? rows.map(x => Array.isArray(x) ? x : args.map(a => x[a])) // pluck
205-
: args[0] === 'function'
205+
: typeof args[0] === 'function'
206206
? rows.map(x => args[0](x)) // map
207207
: rows
208208
}

0 commit comments

Comments
 (0)