Skip to content

Commit 501c683

Browse files
committed
Fix slot tally for new characters without any items.
1 parent 8d24aef commit 501c683

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.1.2
2+
- Fix slot tally for new characters without any items.
3+
14
# 0.1.1
25
- Mark compatibility with Foundry 0.8.9.
36
- Fix typos in function calls for ability and weapon rolls.

module/actor/sheet/character-sheet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class DISCharacterSheet extends DISActorSheet {
4545
sheetData.data.armor = sheetData.items.filter(item => item.type === CONFIG.DIS.itemTypes.armor).sort(byName);
4646
sheetData.data.equipment = sheetData.items.filter(item => item.type === CONFIG.DIS.itemTypes.equipment).sort(byName);
4747
const allSlotItems = [...sheetData.data.weapons, ...sheetData.data.armor, ...sheetData.data.equipment];
48-
sheetData.data.totalSlots = allSlotItems.map(item => item.data.slots).reduce((prev, next) => prev + next);
48+
sheetData.data.totalSlots = allSlotItems.map(item => item.data.slots).reduce((prev, next) => prev + next, []);
4949
sheetData.data.maxSlots = 12 + sheetData.data.abilities.body.value;
5050
}
5151

0 commit comments

Comments
 (0)