Skip to content

Commit 3f6bbab

Browse files
committed
Fix support for node 8 and 10
1 parent bba0bc4 commit 3f6bbab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function Postgres(a, b) {
200200
function nested(first, rest) {
201201
const o = Object.create(notPromise)
202202
o.first = first
203-
o.rest = rest.flat()
203+
o.rest = rest.reduce((acc, val) => acc.concat(val), [])
204204
return o
205205
}
206206

@@ -353,7 +353,7 @@ function Postgres(a, b) {
353353
onclose: () => {
354354
Object.entries(listeners).forEach(([channel, fns]) => {
355355
delete listeners[channel]
356-
Promise.allSettled(fns.map(fn => listen(channel, fn)))
356+
Promise.all(fns.map(fn => listen(channel, fn).catch(() => { /* noop */ })))
357357
})
358358
}
359359
},

0 commit comments

Comments
 (0)