Skip to content

Commit

Permalink
provide default for stars in package info
Browse files Browse the repository at this point in the history
  • Loading branch information
selichter committed Aug 18, 2021
1 parent f0ba73c commit abe78f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/App/Views/PackageInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ struct PackageInfo {
extension PackageInfo {
init?(package: Package) {
guard let repoName = package.repository?.name,
let repoOwner = package.repository?.owner
let repoOwner = package.repository?.owner,
let repoStars = package.repository?.stars ?? 0

else {
return nil
}
Expand Down

0 comments on commit abe78f5

Please sign in to comment.