Skip to content

Commit

Permalink
NAS-124419: Checking for null (#9005)
Browse files Browse the repository at this point in the history
(cherry picked from commit 66e36ad)

Co-authored-by: RehanY147 <[email protected]>
  • Loading branch information
bugclerk and RehanY147 authored Oct 3, 2023
1 parent 6d152d6 commit a352242
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export class AppCardComponent {
readonly officialCatalog = officialCatalog;

get description(): string {
return this.app.description.length > 150 ? `${this.app.description.substring(0, 150)}...` : this.app.description;
const description = this.app.description || '';
return description.length > 150 ? `${description.substring(0, 150)}...` : description;
}

constructor(
Expand Down

0 comments on commit a352242

Please sign in to comment.