Skip to content

Commit c2256f3

Browse files
committed
updates
1 parent f83ba4b commit c2256f3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/autodesk/autodesk.app.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export default {
6363
},
6464
];
6565

66-
const fetchFoldersRecursively = async (folderId) => {
66+
const fetchFoldersRecursively = async (folderId, depth = 0, maxDepth = 10) => {
67+
if (depth > maxDepth) {
68+
return;
69+
}
6770
const { data } = await this.getFolderContent({
6871
projectId,
6972
folderId,
@@ -81,7 +84,7 @@ export default {
8184
options.push(...folders);
8285

8386
for (const folder of folders) {
84-
await fetchFoldersRecursively(folder.value);
87+
await fetchFoldersRecursively(folder.value, depth + 1, maxDepth);
8588
}
8689
};
8790

@@ -260,6 +263,7 @@ export default {
260263
return;
261264
}
262265
hasMore = data?.length === args.params["page[limit]"];
266+
args.params["page[number]"] += 1;
263267
}
264268
}
265269
},

0 commit comments

Comments
 (0)