Check callback for undefined

As of 7.0 pg / 2.0 pg-pool the callback is called with `undefined` rather than `null`: https://github.com/brianc/node-pg-pool/blob/master/index.js#L227
This commit is contained in:
Nicholas Wolverson 2017-08-13 21:32:13 +01:00 committed by GitHub
parent 97583e0cc8
commit 469f9fd2a5

View File

@ -13,7 +13,7 @@ exports.ffiConnect = function(pool) {
return function(onSuccess) {
return function() {
pool.connect(function(err, client, done) {
if (err !== null) {
if (err != null) {
onError(err)();
return;
}
@ -35,7 +35,7 @@ exports.ffiUnsafeQuery = function(client) {
values: values,
rowMode: 'array',
}, function(err, result) {
if (err !== null) {
if (err != null) {
onError(err)();
return;
}