Skip to content

Commit e2674c6

Browse files
authored
fix(NODE-5509): Allow undefined or null params in ObjectId.equals (#607)
1 parent 9615902 commit e2674c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/objectid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export class ObjectId extends BSONValue {
194194
*
195195
* @param otherId - ObjectId instance to compare against.
196196
*/
197-
equals(otherId: string | ObjectId | ObjectIdLike): boolean {
197+
equals(otherId: string | ObjectId | ObjectIdLike | undefined | null): boolean {
198198
if (otherId === undefined || otherId === null) {
199199
return false;
200200
}

0 commit comments

Comments
 (0)