Merge pull request #251 from lbryio/fix-zeroClaimsBug
fix bug of reporting 0 total claims
This commit is contained in:
commit
e78c2a7e9f
2 changed files with 2 additions and 2 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -2161,7 +2161,7 @@ const makeSelectNsfwCountForChannel = uri => reselect.createSelector(selectClaim
|
||||||
});
|
});
|
||||||
|
|
||||||
const makeSelectOmittedCountForChannel = uri => reselect.createSelector(makeSelectTotalItemsForChannel(uri), makeSelectTotalClaimsInChannelSearch(uri), (claimsInChannel, claimsInSearch) => {
|
const makeSelectOmittedCountForChannel = uri => reselect.createSelector(makeSelectTotalItemsForChannel(uri), makeSelectTotalClaimsInChannelSearch(uri), (claimsInChannel, claimsInSearch) => {
|
||||||
if (claimsInChannel && claimsInSearch) {
|
if (claimsInChannel && typeof claimsInSearch === 'number' && claimsInSearch >= 0) {
|
||||||
return claimsInChannel - claimsInSearch;
|
return claimsInChannel - claimsInSearch;
|
||||||
} else return 0;
|
} else return 0;
|
||||||
});
|
});
|
||||||
|
|
|
@ -471,7 +471,7 @@ export const makeSelectOmittedCountForChannel = (uri: string) =>
|
||||||
makeSelectTotalItemsForChannel(uri),
|
makeSelectTotalItemsForChannel(uri),
|
||||||
makeSelectTotalClaimsInChannelSearch(uri),
|
makeSelectTotalClaimsInChannelSearch(uri),
|
||||||
(claimsInChannel, claimsInSearch) => {
|
(claimsInChannel, claimsInSearch) => {
|
||||||
if (claimsInChannel && claimsInSearch) {
|
if (claimsInChannel && typeof claimsInSearch === 'number' && claimsInSearch >= 0) {
|
||||||
return claimsInChannel - claimsInSearch;
|
return claimsInChannel - claimsInSearch;
|
||||||
}
|
}
|
||||||
else return 0;
|
else return 0;
|
||||||
|
|
Loading…
Reference in a new issue