diff --git a/lib/Core.ts b/lib/Core.ts index 6810b55..0589cab 100644 --- a/lib/Core.ts +++ b/lib/Core.ts @@ -167,7 +167,7 @@ export class Core { return Bluebird.bind(this).then(() => { if (this._connection) return this._connection; if (this._connectPromise) return this._connectPromise; - return this._connectPromise = this.mongoConnectAsyc(this.url, this._config.options); + return this._connectPromise = this.mongoConnectAsyc(this.url, this._config && this._config.options); }).then((db: MongoDB.Db) => { return this.onConnecting(db); }).then(db => {