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 +1 -1
- package/src/helpers/functions.js +2 -1
package/package.json
CHANGED
package/src/helpers/functions.js
CHANGED
|
@@ -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
|
-
|
|
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 = {
|