Skip to content

Commit

Permalink
fix limit not being applied if there's no channelids
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarebczan committed Oct 10, 2024
1 parent 70970f3 commit 8750bcb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ui/util/buildHomepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ export const getHomepageRowForCat = (key: string, cat: HomepageCat) => {
if (typeof cat.channelLimit === 'string' && cat.channelIds && cat.channelIds.length) {
if (cat.channelLimit === 'auto') {
limitClaims = getLimitPerChannel(cat.channelIds.length, isChannelType);
} else if (cat.channelLimit) {
const limitNumber = Number(cat.channelLimit);
// eslint-disable-next-line
if (limitNumber === limitNumber && limitNumber !== 0) {
// because javascript and NaN !== NaN
limitClaims = Math.floor(limitNumber);
}
}
} else if (typeof cat.channelLimit === 'string' && cat.channelLimit) {
const limitNumber = Number(cat.channelLimit);
// eslint-disable-next-line
if (limitNumber === limitNumber && limitNumber !== 0) {
// because javascript and NaN !== NaN
limitClaims = Math.floor(limitNumber);
}
}

Expand Down

0 comments on commit 8750bcb

Please sign in to comment.