fix export and url selector
This commit is contained in:
parent
a1ae63d0b6
commit
c04f6806f7
3 changed files with 10 additions and 12 deletions
12
dist/bundle.es.js
vendored
12
dist/bundle.es.js
vendored
|
@ -1408,7 +1408,11 @@ const makeSelectContentTypeForUri = uri => reselect.createSelector(makeSelectCla
|
||||||
|
|
||||||
const makeSelectThumbnailForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
|
const makeSelectThumbnailForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
|
||||||
const thumbnail = claim && claim.value && claim.value.thumbnail;
|
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 => {
|
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 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 selectState$2 = state => state.wallet || {};
|
||||||
|
|
||||||
const selectWalletState = selectState$2;
|
const selectWalletState = selectState$2;
|
||||||
|
@ -4785,7 +4785,6 @@ exports.makeSelectClaimForUri = makeSelectClaimForUri;
|
||||||
exports.makeSelectClaimIsMine = makeSelectClaimIsMine;
|
exports.makeSelectClaimIsMine = makeSelectClaimIsMine;
|
||||||
exports.makeSelectClaimIsNsfw = makeSelectClaimIsNsfw;
|
exports.makeSelectClaimIsNsfw = makeSelectClaimIsNsfw;
|
||||||
exports.makeSelectClaimIsPending = makeSelectClaimIsPending;
|
exports.makeSelectClaimIsPending = makeSelectClaimIsPending;
|
||||||
exports.makeSelectClaimSearchUrisForTags = makeSelectClaimSearchUrisForTags;
|
|
||||||
exports.makeSelectClaimsInChannelForCurrentPageState = makeSelectClaimsInChannelForCurrentPageState;
|
exports.makeSelectClaimsInChannelForCurrentPageState = makeSelectClaimsInChannelForCurrentPageState;
|
||||||
exports.makeSelectClaimsInChannelForPage = makeSelectClaimsInChannelForPage;
|
exports.makeSelectClaimsInChannelForPage = makeSelectClaimsInChannelForPage;
|
||||||
exports.makeSelectCommentsForUri = makeSelectCommentsForUri;
|
exports.makeSelectCommentsForUri = makeSelectCommentsForUri;
|
||||||
|
@ -4795,7 +4794,6 @@ exports.makeSelectCoverForUri = makeSelectCoverForUri;
|
||||||
exports.makeSelectDateForUri = makeSelectDateForUri;
|
exports.makeSelectDateForUri = makeSelectDateForUri;
|
||||||
exports.makeSelectDownloadingForUri = makeSelectDownloadingForUri;
|
exports.makeSelectDownloadingForUri = makeSelectDownloadingForUri;
|
||||||
exports.makeSelectFetchingChannelClaims = makeSelectFetchingChannelClaims;
|
exports.makeSelectFetchingChannelClaims = makeSelectFetchingChannelClaims;
|
||||||
exports.makeSelectFetchingClaimSearchForTags = makeSelectFetchingClaimSearchForTags;
|
|
||||||
exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
|
exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
|
||||||
exports.makeSelectFirstRecommendedFileForUri = makeSelectFirstRecommendedFileForUri;
|
exports.makeSelectFirstRecommendedFileForUri = makeSelectFirstRecommendedFileForUri;
|
||||||
exports.makeSelectIsUriResolving = makeSelectIsUriResolving;
|
exports.makeSelectIsUriResolving = makeSelectIsUriResolving;
|
||||||
|
|
|
@ -194,8 +194,6 @@ export {
|
||||||
selectFetchingClaimSearch,
|
selectFetchingClaimSearch,
|
||||||
selectfetchingClaimSearchByQuery,
|
selectfetchingClaimSearchByQuery,
|
||||||
selectClaimSearchByQuery,
|
selectClaimSearchByQuery,
|
||||||
makeSelectFetchingClaimSearchForTags,
|
|
||||||
makeSelectClaimSearchUrisForTags,
|
|
||||||
} from 'redux/selectors/claims';
|
} from 'redux/selectors/claims';
|
||||||
|
|
||||||
export { makeSelectCommentsForUri } from 'redux/selectors/comments';
|
export { makeSelectCommentsForUri } from 'redux/selectors/comments';
|
||||||
|
|
|
@ -255,9 +255,11 @@ export const makeSelectThumbnailForUri = (uri: string) =>
|
||||||
makeSelectClaimForUri(uri),
|
makeSelectClaimForUri(uri),
|
||||||
claim => {
|
claim => {
|
||||||
const thumbnail = claim && claim.value && claim.value.thumbnail;
|
const thumbnail = claim && claim.value && claim.value.thumbnail;
|
||||||
return thumbnail && thumbnail.url && thumbnail.url.trim().length > 0
|
if (!thumbnail || !thumbnail.url) {
|
||||||
? thumbnail.url
|
return undefined;
|
||||||
: undefined;
|
}
|
||||||
|
|
||||||
|
return thumbnail.url.trim();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue