From 6fbe9603feaa4b3176e81dff4083c8611f5cc2e9 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 16 Apr 2024 07:08:20 +0300 Subject: [PATCH] conditional --- src/components/Views/Author/Author.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index 78bcd4ac..4784197a 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -69,7 +69,7 @@ export const AuthorView = (props: Props) => { const a = authorEntities()[props.authorSlug] setAuthor(a) console.debug('[AuthorView] preloaded author:', a) - } else if (props.authorSlug && !author().stat) { + } else if (props.authorSlug && !author()?.stat) { // load author const a = await loadAuthor({ slug: props.authorSlug, author_id: author()?.id }) setAuthor(a)