Access Promise through global (#39)

This matches the proposed way in "bring your own promise".
This commit is contained in:
Raul Ochoa 2017-04-01 18:28:27 +02:00 committed by Brian C
parent 2aed8bf7b3
commit 0f323999fc

View File

@ -11,7 +11,7 @@ var Pool = module.exports = function (options, Client) {
this.options = objectAssign({}, options)
this.log = this.options.log || function () { }
this.Client = this.options.Client || Client || require('pg').Client
this.Promise = this.options.Promise || Promise
this.Promise = this.options.Promise || global.Promise
this.options.max = this.options.max || this.options.poolSize || 10
this.options.create = this.options.create || this._create.bind(this)