diff --git a/lib/Core.ts b/lib/Core.ts index e2ed137..83e327a 100644 --- a/lib/Core.ts +++ b/lib/Core.ts @@ -187,7 +187,7 @@ export class Core { if (!this._connection) return this; let conn: MongoDB.MongoClient = this._connection; this._connection = undefined; - conn.close(); + conn.close && conn.close(); return this; }), callback); }