forked from Kieran/snort
bug: reaction with no e tag
This commit is contained in:
parent
3fd5fd8568
commit
29f92b7cb2
@ -12,9 +12,11 @@ export default function NoteReaction(props) {
|
||||
const ev = props["data-ev"] || Event.FromObject(props.data);
|
||||
|
||||
const refEvent = useMemo(() => {
|
||||
if(ev) {
|
||||
if (ev) {
|
||||
let eTags = ev.Tags.filter(a => a.Key === "e");
|
||||
return eTags[0].Event;
|
||||
if (eTags.length > 0) {
|
||||
return eTags[0].Event;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}, [ev]);
|
||||
|
Loading…
Reference in New Issue
Block a user