Correct the two off-by-one errors in my weapons limiting logic
This commit is contained in:
parent
09fe218076
commit
7b29fc8d6f
1 changed files with 1 additions and 1 deletions
|
|
@ -192,7 +192,7 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ctx.weapons.length < limit) {
|
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;
|
const itemIndex = ctx.weapons.length;
|
||||||
ctx.weapons.push({
|
ctx.weapons.push({
|
||||||
data: null,
|
data: null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue