fix: 🐛
This commit is contained in:
parent
ec19b9cbfe
commit
05ca35feb1
1 changed files with 2 additions and 3 deletions
|
|
@ -15,8 +15,8 @@ export default function RepostNoteCard({
|
||||||
}) {
|
}) {
|
||||||
const { mutePubkeys } = useMuteList()
|
const { mutePubkeys } = useMuteList()
|
||||||
const targetEvent = useMemo(() => {
|
const targetEvent = useMemo(() => {
|
||||||
const targetEvent = event.content ? (JSON.parse(event.content) as Event) : null
|
|
||||||
try {
|
try {
|
||||||
|
const targetEvent = event.content ? (JSON.parse(event.content) as Event) : null
|
||||||
if (!targetEvent || !verifyEvent(targetEvent) || targetEvent.kind !== kinds.ShortTextNote) {
|
if (!targetEvent || !verifyEvent(targetEvent) || targetEvent.kind !== kinds.ShortTextNote) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
@ -28,11 +28,10 @@ export default function RepostNoteCard({
|
||||||
client.trackEventSeenOn(targetEvent.id, relay)
|
client.trackEventSeenOn(targetEvent.id, relay)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
return targetEvent
|
||||||
} catch {
|
} catch {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return targetEvent
|
|
||||||
}, [event])
|
}, [event])
|
||||||
if (!targetEvent) return null
|
if (!targetEvent) return null
|
||||||
if (filterMutedNotes && mutePubkeys.includes(targetEvent.pubkey)) {
|
if (filterMutedNotes && mutePubkeys.includes(targetEvent.pubkey)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue