mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
fix: return in case pubkey is undefined
This commit is contained in:
parent
24068d12d0
commit
8d7621fbaf
1 changed files with 2 additions and 1 deletions
|
|
@ -11,7 +11,8 @@ async function renderReport(reportEvent: DittoEvent, profile: DittoEvent) {
|
|||
|
||||
const statusIds = reportEvent.tags.filter(([name]) => name === 'e').map((tag) => tag[1]) ?? [];
|
||||
|
||||
const reportedPubkey = reportEvent.tags.find(([name]) => name === 'p')?.[1]!;
|
||||
const reportedPubkey = reportEvent.tags.find(([name]) => name === 'p')?.[1];
|
||||
if (!reportedPubkey) return;
|
||||
|
||||
return {
|
||||
id: reportEvent.id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue