fix makeSelectDateForUri error on mobile

This commit is contained in:
Akinwale Ariwodola 2019-07-03 10:53:12 +01:00
parent 1ad35b8b40
commit 321b4e9d93
2 changed files with 2 additions and 2 deletions

2
dist/bundle.es.js vendored
View file

@ -1337,7 +1337,7 @@ const makeSelectMetadataItemForUri = (uri, key) => reselect.createSelector(makeS
const makeSelectTitleForUri = uri => reselect.createSelector(makeSelectMetadataForUri(uri), metadata => metadata && metadata.title);
const makeSelectDateForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
const timestamp = claim && claim.value && (claim.value.release_time ? claim.value.release_time * 1000 : claim.meta.creation_timestamp * 1000);
const timestamp = claim && claim.value && (claim.value.release_time ? claim.value.release_time * 1000 : claim.meta.creation_timestamp ? claim.meta.creation_timestamp * 1000 : null);
if (!timestamp) {
return undefined;
}

View file

@ -195,7 +195,7 @@ export const makeSelectDateForUri = (uri: string) =>
claim.value &&
(claim.value.release_time
? claim.value.release_time * 1000
: claim.meta.creation_timestamp * 1000);
: (claim.meta.creation_timestamp ? claim.meta.creation_timestamp * 1000 : null));
if (!timestamp) {
return undefined;
}