From 20660444fd9a20c192301b62f4ef284c8f507b55 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 16 Feb 2021 21:40:58 +0100 Subject: :bug: fix Mongodb BigInt --- dist/util/MongoBigInt.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dist/util/MongoBigInt.js') diff --git a/dist/util/MongoBigInt.js b/dist/util/MongoBigInt.js index 7dae718e..c026f77a 100644 --- a/dist/util/MongoBigInt.js +++ b/dist/util/MongoBigInt.js @@ -38,6 +38,8 @@ class LongSchema extends mongoose_1.default.SchemaType { return val; if ("" === val) return null; + if (typeof val === "bigint") + return mongoose_1.default.mongo.Long.fromString(val.toString()); if (val instanceof mongoose_1.default.mongo.Long) return BigInt(val.toString()); if (val instanceof Number || "number" == typeof val) -- cgit 1.5.1