fix: check if event is not undefined in renderAdminAccount

This commit is contained in:
P. Reis 2024-05-04 20:12:34 -03:00
parent b8df95408b
commit 8a7f0892d7
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import { accountFromPubkey, renderAccount } from '@/views/mastodon/accounts.ts';
async function renderAdminAccount(event: DittoEvent) {
let account;
if (event.kind === 0 && event.user) {
if (event && event.kind === 0 && event.user) {
account = await renderAccount(event);
} else {
const d = event.tags.find(([name]) => name === 'd')?.[1]!;