Skip to content

Commit b9dcca1

Browse files
committed
fix: simplify name check
1 parent ae68917 commit b9dcca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/packages/swift/metadata.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ func ParsePackage(sr io.ReaderAt, size int64, mr io.Reader) (*Package, error) {
191191
MiddleName: ssc.Author.MiddleName,
192192
FamilyName: ssc.Author.FamilyName,
193193
}
194-
// If Name is not provided but individual name components are, generate it
195-
if author.Name == "" && (author.GivenName != "" || author.MiddleName != "" || author.FamilyName != "") {
194+
// If Name is not provided, generate it from individual name components
195+
if author.Name == "" {
196196
author.Name = author.String()
197197
}
198198
p.Metadata.Author = author

0 commit comments

Comments
 (0)