fix postgresql transaction

This commit is contained in:
Diana Lau 2017-07-05 22:29:25 -04:00
parent ffa776cf6a
commit 4bcf00e3a9
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ Transaction.begin = function(connector, options, cb) {
return cb(err);
}
var tx = connection;
if (!(connection instanceof Transaction)) {
if (!(connection instanceof Transaction) && !(typeof connection.txId === 'string')) {
tx = new Transaction(connector, connection);
}
cb(err, tx);