@dyrected/core 2.5.63 → 2.5.65

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/dist/server.cjs CHANGED
@@ -177,7 +177,7 @@ var PopulationService = class {
177
177
  }
178
178
  const populatedDoc = { ...data };
179
179
  for (const field of fields) {
180
- if (field.type === "join" && field.collection && field.on && currentDepth === 0) {
180
+ if (field.type === "join" && field.collection && field.on && currentDepth < maxDepth) {
181
181
  const targetCollection = this.collections.find(
182
182
  (c) => c.slug === field.collection
183
183
  );
@@ -196,7 +196,7 @@ var PopulationService = class {
196
196
  (doc) => DefaultsService.apply(targetCollection.fields, doc)
197
197
  ),
198
198
  fields: targetCollection.fields,
199
- currentDepth: 1,
199
+ currentDepth: currentDepth + 1,
200
200
  maxDepth
201
201
  });
202
202
  populatedDoc[field.name] = {
package/dist/server.js CHANGED
@@ -110,7 +110,7 @@ var PopulationService = class {
110
110
  }
111
111
  const populatedDoc = { ...data };
112
112
  for (const field of fields) {
113
- if (field.type === "join" && field.collection && field.on && currentDepth === 0) {
113
+ if (field.type === "join" && field.collection && field.on && currentDepth < maxDepth) {
114
114
  const targetCollection = this.collections.find(
115
115
  (c) => c.slug === field.collection
116
116
  );
@@ -129,7 +129,7 @@ var PopulationService = class {
129
129
  (doc) => DefaultsService.apply(targetCollection.fields, doc)
130
130
  ),
131
131
  fields: targetCollection.fields,
132
- currentDepth: 1,
132
+ currentDepth: currentDepth + 1,
133
133
  maxDepth
134
134
  });
135
135
  populatedDoc[field.name] = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/core",
3
- "version": "2.5.63",
3
+ "version": "2.5.65",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",