File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -595,11 +595,19 @@ async function fetchApiContentsRemote(
595595 const directoryFiles =
596596 ( await directoryFilesResponse . json ( ) ) as Array < GitHubFile >
597597
598- file . children = await buildFileTree (
599- directoryFiles ,
600- depth + 1 ,
601- `${ parentPath } ${ file . path } /` ,
602- )
598+ if ( ! Array . isArray ( directoryFiles ) ) {
599+ console . warn (
600+ `Expected an array of files from GitHub API for directory ${ file . path } , but received:\n` ,
601+ JSON . stringify ( directoryFiles ) ,
602+ )
603+ // Leave file.children undefined
604+ } else {
605+ file . children = await buildFileTree (
606+ directoryFiles ,
607+ depth + 1 ,
608+ `${ parentPath } ${ file . path } /` ,
609+ )
610+ }
603611 }
604612
605613 result . push ( file )
Original file line number Diff line number Diff line change 312312 "name" : " Detecting-AI" ,
313313 "imageUrl" : " https://detecting-ai.com/images/favicon.png" ,
314314 "linkUrl" : " https://detecting-ai.com/"
315+ },
316+ {
317+ "login" : " fingerprintjs" ,
318+ "name" : " Fingerprint" ,
319+ "imageUrl" : " https://fingerprint.com/img/uploads/fingerprint_white_on_orange.png" ,
320+ "linkUrl" : " https://fingerprint.com?utm_source=tanstack"
315321 }
316322]
You can’t perform that action at this time.
0 commit comments