Skip to content

Commit

Permalink
IRawGalleryExtension.shortDescription can be undefined, some extens…
Browse files Browse the repository at this point in the history
…ions doesn't have a "shortDescription" like: "temakulakov.hackjb"
  • Loading branch information
petvas committed Jan 18, 2024
1 parent 25282a9 commit 0c4481d
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 @@ -533,7 +533,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 0c4481d

Please sign in to comment.