mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-04 22:24:25 +01:00
fix: check if event is not undefined in renderAdminAccount
This commit is contained in:
@@ -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]!;
|
||||
|
||||
Reference in New Issue
Block a user