diff --git a/src/cache.js b/src/cache.js index 02aaffe..dd9d255 100644 --- a/src/cache.js +++ b/src/cache.js @@ -10,7 +10,7 @@ const stringToId = str => { return str } - if (ObjectId.isValid(str)) { + if (ObjectId.isValid(str) && new ObjectId(str) === str) { return new ObjectId(str) }