fixes bug of reporting 0 claims
This commit is contained in:
parent
9b11cfed62
commit
00d8a9e5c2
2 changed files with 2 additions and 2 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -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;
|
||||||
});
|
});
|
||||||
|
|
|
@ -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