generated from tpl/purs
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:
parent
97583e0cc8
commit
469f9fd2a5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user