We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d0c91d commit 654344cCopy full SHA for 654344c
src/lib/APIClient.ts
@@ -8,7 +8,7 @@ import ObjectId from "bson-objectid";
8
superjson.registerCustom<ObjectId, string>(
9
{
10
isApplicable: (value): value is ObjectId => {
11
- if (ObjectId.isValid(value)) {
+ if (typeof value !== "string" && ObjectId.isValid(value)) {
12
const str = value.toString();
13
return /^[0-9a-fA-F]{24}$/.test(str);
14
}
0 commit comments