implements maxDepth

This commit is contained in:
James
2020-10-04 15:30:38 -04:00
parent 5ae267f743
commit 0a5e8ab618
3 changed files with 4 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ async function performFieldOperations(entityConfig, args) {
if (payloadAPI === 'REST' || payloadAPI === 'local') {
depth = (args.depth || args.depth === 0) ? parseInt(args.depth, 10) : this.config.defaultDepth;
if (depth > this.config.maxDepth) depth = this.config.maxDepth;
}
const currentDepth = args.currentDepth || 1;