Skip to content

Commit

Permalink
🐛 Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 12, 2024
1 parent 6311193 commit f7e26d1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions actions/stage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,17 @@ func sanitizePackage(pkg *Package) {
pkg.Name = sterilizer.Sanitize(pkg.Name)
pkg.Author = sterilizer.Sanitize(pkg.Author)

pkg.DisplayName.Default = sterilizer.Sanitize(pkg.DisplayName.Default)
pkg.DisplayName.ZhCN = sterilizer.Sanitize(pkg.DisplayName.ZhCN)
pkg.DisplayName.EnUS = sterilizer.Sanitize(pkg.DisplayName.EnUS)
if nil != pkg.DisplayName {
pkg.DisplayName.Default = sterilizer.Sanitize(pkg.DisplayName.Default)
pkg.DisplayName.ZhCN = sterilizer.Sanitize(pkg.DisplayName.ZhCN)
pkg.DisplayName.EnUS = sterilizer.Sanitize(pkg.DisplayName.EnUS)
}

pkg.Description.Default = sterilizer.Sanitize(pkg.Description.Default)
pkg.Description.ZhCN = sterilizer.Sanitize(pkg.Description.ZhCN)
pkg.Description.EnUS = sterilizer.Sanitize(pkg.Description.EnUS)
if nil != pkg.Description {
pkg.Description.Default = sterilizer.Sanitize(pkg.Description.Default)
pkg.Description.ZhCN = sterilizer.Sanitize(pkg.Description.ZhCN)
pkg.Description.EnUS = sterilizer.Sanitize(pkg.Description.EnUS)
}
}

type DisplayName struct {
Expand Down

0 comments on commit f7e26d1

Please sign in to comment.