Update Mongodb client to 2.2.4 (#2329)

* chore(package): update mongodb to version 2.2.4

https://greenkeeper.io/

* fix for mongo 2.2.4

* Delete schema promise on error...

- Just because this way we can let the adapter an opportunity to yield a new error....
OR A SUCCESS

* Fixes test

* Restore fix
This commit is contained in:
Florent Vilmart
2016-07-19 21:40:01 -04:00
committed by GitHub
parent 78ea02968a
commit dfac9725dd
3 changed files with 4 additions and 3 deletions

View File

@@ -110,7 +110,8 @@ DatabaseController.prototype.validateClassName = function(className) {
DatabaseController.prototype.loadSchema = function() {
if (!this.schemaPromise) {
this.schemaPromise = SchemaController.load(this.adapter);
this.schemaPromise.then(() => delete this.schemaPromise);
this.schemaPromise.then(() => delete this.schemaPromise,
() => delete this.schemaPromise);
}
return this.schemaPromise;
};