fix(theme): incorrect copyright author, close #443 (#445)

This commit is contained in:
pengzhanbo 2025-01-21 12:00:23 +08:00 committed by GitHub
parent 62c43d25ee
commit 363a0dd425
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,6 +99,9 @@ function resolveAuthor(
): { name: string, url?: string } | undefined {
const contributor = contributors[0]
if (!author && contributor && creation === 'original')
return contributor
const options = typeof author === 'string' ? { name: author } : author
if (options && !options.url) {
@ -106,8 +109,6 @@ function resolveAuthor(
if (contributor)
options.url = contributor.url
}
if (creation === 'original' && contributor)
return contributor
return options
}