add extra check for claim to prevent crash

This commit is contained in:
Sean Yesmunt 2021-02-02 16:18:48 -05:00
parent 7c926ad8de
commit 5d41b0656c
2 changed files with 6 additions and 6 deletions

2
dist/bundle.es.js vendored
View file

@ -2242,7 +2242,7 @@ const makeSelectClaimForUri = (uri, returnRepost = true) => reselect.createSelec
return undefined;
}
const repostedClaim = claim.reposted_claim;
const repostedClaim = claim && claim.reposted_claim;
if (repostedClaim && returnRepost) {
const channelUrl = claim.signing_channel && claim.signing_channel.canonical_url;

View file

@ -119,7 +119,7 @@ export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true)
return undefined;
}
const repostedClaim = claim.reposted_claim;
const repostedClaim = claim && claim.reposted_claim;
if (repostedClaim && returnRepost) {
const channelUrl = claim.signing_channel && claim.signing_channel.canonical_url;