Skip to content

Commit b4c4602

Browse files
committed
Ensure listen call connects
1 parent 5e53759 commit b4c4602

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default function Postgres(url, options) {
147147
? reject(errors.connection('ENDED', options))
148148
: ready
149149
? send(connection, query, xs, args)
150-
: fetchArrayTypes().then(() => send(connection, query, xs, args)).catch(reject)
150+
: fetchArrayTypes(connection).then(() => send(connection, query, xs, args)).catch(reject)
151151
})
152152

153153
promise.stream = (fn) => (query.stream = fn, promise)
@@ -255,7 +255,7 @@ export default function Postgres(url, options) {
255255

256256
function addTypes(instance, connection) {
257257
Object.assign(instance, {
258-
notify: (channel, payload) => instance`select pg_notify(${ channel }, ${ String(payload) })`,
258+
notify: (channel, payload) => instance`select pg_notify(${ channel }, ${ '' + payload })`,
259259
unsafe: (xs, args) => query(true, connection || getConnection(), xs, args),
260260
array,
261261
rows,

0 commit comments

Comments
 (0)