adminmate-express-mongoose 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminmate-express-mongoose",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "description": "Adminmate Express/Mongoose connector",
5
5
  "author": "Marc Delalonde",
6
6
  "homepage": "http://adminmate.io",
@@ -284,7 +284,8 @@ module.exports = _conf => {
284
284
  let fieldsToPopulate = [];
285
285
  fieldsToFetch.forEach(field => {
286
286
  const matchingField = keys.find(k => k.path === field);
287
- if (matchingField && matchingField.type === 'ObjectID' && (matchingField.ref || matchingField.refPath)) {
287
+ const isItObjectIdField = matchingField && matchingField.type?.toLowerCase() === 'objectid';
288
+ if (isItObjectIdField && (matchingField.ref || matchingField.refPath)) {
288
289
 
289
290
  let fieldToSelect = '_id';
290
291
  let toPush = {