conditional

This commit is contained in:
Untone 2024-04-16 07:08:20 +03:00
parent f2012bca18
commit 6fbe9603fe

View File

@ -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)