Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ObjectId): will now throw if an invalid character is passed
If a non-hex string of length 12 is passed into the ObjectId constructor, we generate a hexString based off of the character codes of the passed in id. This requires that the passed id consist entirely of characters with values < 256 in utf-16. Previously, we let this silently fail and generated invalid hex string. Now, we throw a TypeError Fixes NODE-1737 BREAKING CHANGE: Where code was previously silently erroring, users may now experience TypeErrors
- Loading branch information