Expect null from hexToBech32

This commit is contained in:
Kieran 2023-01-10 11:20:51 +00:00
parent ccbf041b2a
commit ee65dd73ab
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -64,7 +64,7 @@ export default function Note(props) {
let pubMentions = mentions.length > maxMentions ? `${mentions?.slice(0, maxMentions).join(", ")} & ${mentions.length - maxMentions} others` : mentions?.join(", "); let pubMentions = mentions.length > maxMentions ? `${mentions?.slice(0, maxMentions).join(", ")} & ${mentions.length - maxMentions} others` : mentions?.join(", ");
return ( return (
<div className="reply"> <div className="reply">
{(pubMentions?.length ?? 0) > 0 ? pubMentions : hexToBech32("note", replyId).substring(0, 12)} {(pubMentions?.length ?? 0) > 0 ? pubMentions : hexToBech32("note", replyId)?.substring(0, 12)}
</div> </div>
) )
} }