Skip to content

Commit

Permalink
Fix IRawGalleryExtension.shortDescription can be undefined. (#202780)
Browse files Browse the repository at this point in the history
`IRawGalleryExtension.shortDescription` can be undefined, some extensions doesn't have a "shortDescription" like: "temakulakov.hackjb"
  • Loading branch information
petvas committed Feb 22, 2024
1 parent d0e118c commit 6eec64e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ interface IRawGalleryExtension {
readonly extensionId: string;
readonly extensionName: string;
readonly displayName: string;
readonly shortDescription: string;
readonly shortDescription?: string;
readonly publisher: IRawGalleryExtensionPublisher;
readonly versions: IRawGalleryExtensionVersion[];
readonly statistics: IRawGalleryExtensionStatistics[];
Expand Down Expand Up @@ -532,7 +532,7 @@ function toExtension(galleryExtension: IRawGalleryExtension, version: IRawGaller
publisherDisplayName: galleryExtension.publisher.displayName,
publisherDomain: galleryExtension.publisher.domain ? { link: galleryExtension.publisher.domain, verified: !!galleryExtension.publisher.isDomainVerified } : undefined,
publisherSponsorLink: getSponsorLink(latestVersion),
description: galleryExtension.shortDescription || '',
description: galleryExtension.shortDescription ?? '',
installCount: getStatistic(galleryExtension.statistics, 'install'),
rating: getStatistic(galleryExtension.statistics, 'averagerating'),
ratingCount: getStatistic(galleryExtension.statistics, 'ratingcount'),
Expand Down

0 comments on commit 6eec64e

Please sign in to comment.