diff --git a/src/objectid.ts b/src/objectid.ts index dcd8cd6a..a7c769b8 100644 --- a/src/objectid.ts +++ b/src/objectid.ts @@ -298,7 +298,7 @@ export class ObjectId { } if (typeof id === 'string') { - return id.length === 12 || (id.length === 24 && checkForHexRegExp.test(id)); + return (id.length === 12 || id.length === 24) && checkForHexRegExp.test(id)); } if (id instanceof ObjectId) {