Skip to content

Commit

Permalink
Ignore errors with missing json attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kmturley committed Aug 2, 2024
1 parent a678dff commit 2cc5776
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function formatOutput(result: any, json?: boolean, list?: boolean): string {
latest.id || '-',
truncateString(latest.name || '-', 40),
truncateString(latest.version || '-', 10),
truncateString(latest.date.split('T')[0] || '-', 10),
truncateString(latest.date?.split('T')[0] || '-', 10),
truncateString(pluginLicense(latest.license)?.name || '-', 20),
truncateString(latest.tags?.join(', ') || '-', 30),
]);
Expand All @@ -135,7 +135,7 @@ function formatOutput(result: any, json?: boolean, list?: boolean): string {
latest.id || '-',
truncateString(latest.name || '-', 40),
truncateString(latest.version || '-', 10),
truncateString(latest.date.split('T')[0] || '-', 10),
truncateString(latest.date?.split('T')[0] || '-', 10),
truncateString(pluginLicense(latest.license)?.name || '-', 20),
truncateString(latest.tags?.join(', ') || '-', 30),
]);
Expand Down
8 changes: 4 additions & 4 deletions src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ function formatOutput(result: any, json?: boolean, list?: boolean): string {
latest.id || '-',
latest.name || '-',
latest.description || '-',
latest.date.split('T')[0] || '-',
latest.date?.split('T')[0] || '-',
latest.version || '-',
latest.tags.join(', ') || '-',
latest.tags?.join(', ') || '-',
// Object.keys(latest.plugins).join(', ') || '-',
]);
}
Expand All @@ -135,9 +135,9 @@ function formatOutput(result: any, json?: boolean, list?: boolean): string {
latest.id || '-',
latest.name || '-',
latest.description || '-',
latest.date.split('T')[0] || '-',
latest.date?.split('T')[0] || '-',
latest.version || '-',
latest.tags.join(', ') || '-',
latest.tags?.join(', ') || '-',
// Object.keys(latest.plugins).join(', ') || '-',
]);
}
Expand Down

0 comments on commit 2cc5776

Please sign in to comment.