diff --git a/classes/Project/ProjectFactory.mjs b/classes/Project/ProjectFactory.mjs index 9c63cbc..04b9d1e 100644 --- a/classes/Project/ProjectFactory.mjs +++ b/classes/Project/ProjectFactory.mjs @@ -155,9 +155,7 @@ export default class ProjectFactory { in: { $mergeObjects: [ '$$value', - { - $$this: { $arrayElemAt: ['$rolePermissions.$$this', 0] } - } + { $arrayElemAt: ['$rolePermissions', { $indexOfArray: ['$rolePermissions', '$$this'] }] } ] } }