fixes bug of reporting 0 claims

This commit is contained in:
jessop 2019-12-12 20:31:37 -05:00
parent 9b11cfed62
commit 00d8a9e5c2
2 changed files with 2 additions and 2 deletions

2
dist/bundle.es.js vendored
View file

@ -2042,7 +2042,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;
}); });

View file

@ -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;