connect-mongo
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -1,4 +0,9 @@ | ||
1.2.0 / In development | ||
1.2.1 / 2016-06-20 | ||
================= | ||
* __Fix__ bluebird warning (Awk34) | ||
1.2.0 / 2016-05-13 | ||
================= | ||
* Accept `dbPromise` as connection param | ||
@@ -5,0 +10,0 @@ * _Add_ `close()` method to close current connection |
{ | ||
"name": "connect-mongo", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "MongoDB session store for Express and Connect", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -199,4 +199,5 @@ 'use strict'; | ||
if (!this.collectionReadyPromise) { | ||
this.collectionReadyPromise = new Promise(function (resolve, reject) { | ||
var promise = this.collectionReadyPromise; | ||
if (!promise) { | ||
promise = new Promise(function (resolve, reject) { | ||
switch (_this4.state) { | ||
@@ -215,5 +216,6 @@ case 'connected': | ||
} | ||
}).bind(this); | ||
}); | ||
this.collectionReadyPromise = promise; | ||
} | ||
return this.collectionReadyPromise; | ||
return promise; | ||
} | ||
@@ -220,0 +222,0 @@ }, { |
@@ -161,4 +161,5 @@ 'use strict'; | ||
collectionReady() { | ||
if (!this.collectionReadyPromise) { | ||
this.collectionReadyPromise = new Promise((resolve, reject) => { | ||
let promise = this.collectionReadyPromise; | ||
if (!promise) { | ||
promise = new Promise((resolve, reject) => { | ||
switch (this.state) { | ||
@@ -175,5 +176,6 @@ case 'connected': | ||
} | ||
}).bind(this); | ||
}); | ||
this.collectionReadyPromise = promise; | ||
} | ||
return this.collectionReadyPromise; | ||
return promise; | ||
} | ||
@@ -180,0 +182,0 @@ |
34490
661