fix: check if event is not undefined in renderAdminAccount
This commit is contained in:
parent
b8df95408b
commit
8a7f0892d7
|
@ -7,7 +7,7 @@ import { accountFromPubkey, renderAccount } from '@/views/mastodon/accounts.ts';
|
||||||
async function renderAdminAccount(event: DittoEvent) {
|
async function renderAdminAccount(event: DittoEvent) {
|
||||||
let account;
|
let account;
|
||||||
|
|
||||||
if (event.kind === 0 && event.user) {
|
if (event && event.kind === 0 && event.user) {
|
||||||
account = await renderAccount(event);
|
account = await renderAccount(event);
|
||||||
} else {
|
} else {
|
||||||
const d = event.tags.find(([name]) => name === 'd')?.[1]!;
|
const d = event.tags.find(([name]) => name === 'd')?.[1]!;
|
||||||
|
|
Loading…
Reference in New Issue