From 05ac3d1e0a252edd7333af2e6a51380c86800cd7 Mon Sep 17 00:00:00 2001 From: Chuanyu Wang Date: Tue, 28 Feb 2017 11:34:42 +0800 Subject: [PATCH] Work around for property 'Symbol(Symbol.toPrimitive)' with node v6.x or higher version --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 881df98..58d59c5 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,9 @@ module.exports = function (connString, cols, options) { } if (db[prop]) return db[prop] + // Work around for property 'Symbol(Symbol.toPrimitive)' with node v6.x or higher version + if (typeof prop === "symbol") return db[prop] + db[prop] = db.collection(prop) return db[prop] }