Skip to content

Commit

Permalink
style: Remove promise binding which is not needed with lambda functions
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Dec 15, 2015
1 parent 8270e79 commit 0c3cb73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class Core {
* @returns {Promise}
*/
connect(callback?: (err: Error, core: Core) => any): Bluebird<Core> {
return Bluebird.bind(this).then(() => {
return Bluebird.resolve().then(() => {
if (this._connection) return this._connection;
if (this._connectPromise) return this._connectPromise;
return this._connectPromise = this.mongoConnectAsyc(this.url, this._config && this._config.options);
Expand All @@ -189,7 +189,7 @@ export class Core {
* @type {Promise}
*/
close(): Bluebird<Core> {
return Bluebird.bind(this).then(() => {
return Bluebird.resolve().then(() => {
if (!this._connection) return this;
var conn: MongoDB.Db = this._connection;
this._connection = null;
Expand Down

0 comments on commit 0c3cb73

Please sign in to comment.