Skip to content

Commit 76cc6b5

Browse files
committed
chore: allow typedoc plugin even without sources
1 parent eb992bb commit 76cc6b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core-packages-documentation-generator/src/sdk-index-link-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class SdkIndexLinkClientPlugin {
7171
const clientsCategory = group.categories.find((value) => value.title === "Clients");
7272
for (const child of clientsCategory.children || []) {
7373
// "clients/service" => "service"
74-
const clientName = child.sources[0].fileName.split(sep)[1];
74+
const clientName = child.sources?.[0].fileName.split(sep)[1];
7575
const clientDocDir = clientDocsPattern.replace(/{{CLIENT}}/g, clientName);
7676
child.url = join(clientDocDir, "index.html");
7777
}
@@ -119,6 +119,6 @@ export class SdkIndexLinkClientPlugin {
119119
}
120120

121121
private isLib(item: DeclarationReflection): boolean {
122-
return item?.sources[0].fileName.startsWith(`lib${sep}`);
122+
return item?.sources?.[0].fileName.startsWith(`lib${sep}`);
123123
}
124124
}

0 commit comments

Comments
 (0)