Skip to content

Commit

Permalink
fix: ts error in utils files
Browse files Browse the repository at this point in the history
  • Loading branch information
efrenaragon96 committed May 16, 2023
1 parent 38e2c61 commit 6f50175
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export function getDocgenSection(component: Component, section: string): any {
}

export function getDocgenDescription(component: Component): string {
return hasDocgen(component) && str(component.__docgenInfo.description);
return hasDocgen(component) ? str(component.__docgenInfo.description) : '';
}
2 changes: 1 addition & 1 deletion code/lib/docs-tools/src/argTypes/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function isTooLongForDefaultValueSummary(value: string): boolean {
return value.length > MAX_DEFAULT_VALUE_SUMMARY_LENGTH;
}

export function createSummaryValue(summary: string, detail?: string): PropSummaryValue {
export function createSummaryValue(summary?: string, detail?: string): PropSummaryValue {
if (summary === detail) {
return { summary };
}
Expand Down

0 comments on commit 6f50175

Please sign in to comment.