From 363a0dd425beee5a50ad794373ee36688fa93c19 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Tue, 21 Jan 2025 12:00:23 +0800 Subject: [PATCH] fix(theme): incorrect copyright author, close #443 (#445) --- theme/src/client/composables/copyright.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/theme/src/client/composables/copyright.ts b/theme/src/client/composables/copyright.ts index 5baec74f..9665936b 100644 --- a/theme/src/client/composables/copyright.ts +++ b/theme/src/client/composables/copyright.ts @@ -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 }