Skip to content

Commit

Permalink
fix channel limit (oops)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarebczan committed Oct 10, 2024
1 parent 8750bcb commit 3443b35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/util/buildHomepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +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);
Expand Down

0 comments on commit 3443b35

Please sign in to comment.