This commit is contained in:
Untone 2024-04-16 07:03:05 +03:00
parent bd4fedc6c7
commit f7c33c167a

View File

@ -64,12 +64,12 @@ export const AuthorView = (props: Props) => {
})
createEffect(async () => {
if(Object.keys(authorEntities()).includes(props.authorSlug) && !author()?.id) {
if (Object.keys(authorEntities()).includes(props.authorSlug) && !author()?.id) {
// use preloaded author
const a = authorEntities()[props.authorSlug]
setAuthor(a)
console.debug('[AuthorView] preloaded author:', a)
} else if(props.authorSlug || (author()?.id && !author().stat)) {
} else if (props.authorSlug || (author()?.id && !author().stat)) {
// load author
const a = await loadAuthor({ slug: props.authorSlug, author_id: author()?.id })
setAuthor(a)