Skip to content

Commit dfac972

Browse files
authored
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
1 parent 78ea029 commit dfac972

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lru-cache": "4.0.1",
3232
"mailgun-js": "0.7.10",
3333
"mime": "1.3.4",
34-
"mongodb": "2.1.18",
34+
"mongodb": "2.2.4",
3535
"multer": "1.1.0",
3636
"parse": "1.9.0",
3737
"parse-server-fs-adapter": "1.0.0",

spec/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('server', () => {
6565
expect(response.statusCode).toEqual(500);
6666
expect(body.code).toEqual(1);
6767
expect(body.message).toEqual('Internal server error.');
68-
done();
68+
reconfigureServer().then(done, done);
6969
});
7070
});
7171
});

src/Controllers/DatabaseController.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ DatabaseController.prototype.validateClassName = function(className) {
110110
DatabaseController.prototype.loadSchema = function() {
111111
if (!this.schemaPromise) {
112112
this.schemaPromise = SchemaController.load(this.adapter);
113-
this.schemaPromise.then(() => delete this.schemaPromise);
113+
this.schemaPromise.then(() => delete this.schemaPromise,
114+
() => delete this.schemaPromise);
114115
}
115116
return this.schemaPromise;
116117
};

0 commit comments

Comments
 (0)