Correct the two off-by-one errors in my weapons limiting logic

This commit is contained in:
Oliver-Akins 2025-02-09 14:14:29 -07:00
parent 09fe218076
commit 7b29fc8d6f

View file

@ -192,7 +192,7 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi
};
if (ctx.weapons.length < limit) {
for (let i = ctx.weapons.length - 1; i <= limit; i++) {
for (let i = ctx.weapons.length; i < limit; i++) {
const itemIndex = ctx.weapons.length;
ctx.weapons.push({
data: null,