File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff 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 } ,
You can’t perform that action at this time.
0 commit comments