Skip to content

Commit

Permalink
Merge pull request #490 from vttred/feat/item-based-encumbrance
Browse files Browse the repository at this point in the history
fix: allow empty array if no tags
  • Loading branch information
anthonyronda authored Nov 28, 2023
2 parents 16381c6 + 6ec28c7 commit 58414a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/module/item/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ export default class OseItem extends Item {
}
if (source?.system?.itemslots === undefined) {
if (
source?.system?.tags.some((tag) => tag.value === "Two-handed") &&
source.type === "weapon"
(source?.system?.tags ?? []).some(
(tag) => tag.value === "Two-handed"
) &&
source?.type === "weapon"
)
source.system.itemslots = 2;
if (source?.system?.type === "heavy" && source.type === "armor")
Expand Down

0 comments on commit 58414a7

Please sign in to comment.