add extra check for claim to prevent crash
This commit is contained in:
parent
7c926ad8de
commit
5d41b0656c
2 changed files with 6 additions and 6 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -259,8 +259,8 @@ export const makeSelectMyPurchasesForPage = (query: ?string, page: number = 1) =
|
|||
const end = Number(page) * Number(PAGE_SIZE);
|
||||
return matchingFileInfos && matchingFileInfos.length
|
||||
? matchingFileInfos
|
||||
.slice(start, end)
|
||||
.map(fileInfo => fileInfo.canonical_url || fileInfo.permanent_url)
|
||||
.slice(start, end)
|
||||
.map(fileInfo => fileInfo.canonical_url || fileInfo.permanent_url)
|
||||
: [];
|
||||
}
|
||||
);
|
||||
|
@ -366,8 +366,8 @@ export const makeSelectDateForUri = (uri: string) =>
|
|||
(claim.value.release_time
|
||||
? claim.value.release_time * 1000
|
||||
: claim.meta && claim.meta.creation_timestamp
|
||||
? claim.meta.creation_timestamp * 1000
|
||||
: null);
|
||||
? claim.meta.creation_timestamp * 1000
|
||||
: null);
|
||||
if (!timestamp) {
|
||||
return undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue