fix export and url selector

This commit is contained in:
Sean Yesmunt 2019-07-30 12:00:36 -04:00
parent a1ae63d0b6
commit c04f6806f7
3 changed files with 10 additions and 12 deletions

12
dist/bundle.es.js vendored
View file

@ -1408,7 +1408,11 @@ const makeSelectContentTypeForUri = uri => reselect.createSelector(makeSelectCla
const makeSelectThumbnailForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
const thumbnail = claim && claim.value && claim.value.thumbnail;
return thumbnail && thumbnail.url && thumbnail.url.trim().length > 0 ? thumbnail.url : undefined;
if (!thumbnail || !thumbnail.url) {
return undefined;
}
return thumbnail.url.trim();
});
const makeSelectCoverForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
@ -1565,10 +1569,6 @@ const selectClaimSearchByQuery = reselect.createSelector(selectState$1, state =>
const makeSelectShortUrlForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => claim && claim.short_url);
const makeSelectFetchingClaimSearchForTags = tags => reselect.createSelector(selectfetchingClaimSearchByQuery, byQuery => byQuery[createNormalizedClaimSearchKey({ any_tags: tags })]);
const makeSelectClaimSearchUrisForTags = tags => reselect.createSelector(selectClaimSearchByQuery, byQuery => byQuery[createNormalizedClaimSearchKey({ any_tags: tags })]);
const selectState$2 = state => state.wallet || {};
const selectWalletState = selectState$2;
@ -4785,7 +4785,6 @@ exports.makeSelectClaimForUri = makeSelectClaimForUri;
exports.makeSelectClaimIsMine = makeSelectClaimIsMine;
exports.makeSelectClaimIsNsfw = makeSelectClaimIsNsfw;
exports.makeSelectClaimIsPending = makeSelectClaimIsPending;
exports.makeSelectClaimSearchUrisForTags = makeSelectClaimSearchUrisForTags;
exports.makeSelectClaimsInChannelForCurrentPageState = makeSelectClaimsInChannelForCurrentPageState;
exports.makeSelectClaimsInChannelForPage = makeSelectClaimsInChannelForPage;
exports.makeSelectCommentsForUri = makeSelectCommentsForUri;
@ -4795,7 +4794,6 @@ exports.makeSelectCoverForUri = makeSelectCoverForUri;
exports.makeSelectDateForUri = makeSelectDateForUri;
exports.makeSelectDownloadingForUri = makeSelectDownloadingForUri;
exports.makeSelectFetchingChannelClaims = makeSelectFetchingChannelClaims;
exports.makeSelectFetchingClaimSearchForTags = makeSelectFetchingClaimSearchForTags;
exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
exports.makeSelectFirstRecommendedFileForUri = makeSelectFirstRecommendedFileForUri;
exports.makeSelectIsUriResolving = makeSelectIsUriResolving;

View file

@ -194,8 +194,6 @@ export {
selectFetchingClaimSearch,
selectfetchingClaimSearchByQuery,
selectClaimSearchByQuery,
makeSelectFetchingClaimSearchForTags,
makeSelectClaimSearchUrisForTags,
} from 'redux/selectors/claims';
export { makeSelectCommentsForUri } from 'redux/selectors/comments';

View file

@ -255,9 +255,11 @@ export const makeSelectThumbnailForUri = (uri: string) =>
makeSelectClaimForUri(uri),
claim => {
const thumbnail = claim && claim.value && claim.value.thumbnail;
return thumbnail && thumbnail.url && thumbnail.url.trim().length > 0
? thumbnail.url
: undefined;
if (!thumbnail || !thumbnail.url) {
return undefined;
}
return thumbnail.url.trim();
}
);