From 0f323999fc071ee471a34f0a937d64087ae23f6a Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Sat, 1 Apr 2017 18:28:27 +0200 Subject: [PATCH] Access `Promise` through global (#39) This matches the proposed way in "bring your own promise". --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index d3551868..43cccae3 100644 --- a/index.js +++ b/index.js @@ -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)