mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix: check if event is not undefined in renderAdminAccount
This commit is contained in:
parent
b8df95408b
commit
8a7f0892d7
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue