Skip to content

Commit

Permalink
Fix support for node 8 and 10
Browse files Browse the repository at this point in the history
  • Loading branch information
porsager committed Oct 2, 2020
1 parent bba0bc4 commit 3f6bbab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function Postgres(a, b) {
function nested(first, rest) {
const o = Object.create(notPromise)
o.first = first
o.rest = rest.flat()
o.rest = rest.reduce((acc, val) => acc.concat(val), [])
return o
}

Expand Down Expand Up @@ -353,7 +353,7 @@ function Postgres(a, b) {
onclose: () => {
Object.entries(listeners).forEach(([channel, fns]) => {
delete listeners[channel]
Promise.allSettled(fns.map(fn => listen(channel, fn)))
Promise.all(fns.map(fn => listen(channel, fn).catch(() => { /* noop */ })))
})
}
},
Expand Down

0 comments on commit 3f6bbab

Please sign in to comment.