summary refs log tree commit diff
path: root/src/util/MongoBigInt.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/MongoBigInt.ts')
-rw-r--r--src/util/MongoBigInt.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/MongoBigInt.ts b/src/util/MongoBigInt.ts
index 28818212..c4e5f623 100644
--- a/src/util/MongoBigInt.ts
+++ b/src/util/MongoBigInt.ts
@@ -33,7 +33,7 @@ class LongSchema extends mongoose.SchemaType {
 	cast(val: any, scope?: any, init?: any, type?: string) {
 		if (null === val) return val;
 		if ("" === val) return null;
-		if (typeof val === "bigint" && type === "query") {
+		if (typeof val === "bigint") {
 			return mongoose.mongo.Long.fromString(val.toString());
 		}