Skip to content

Commit

Permalink
Fix detection of stowed within recursive containers (#15022)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez committed Jun 9, 2024
1 parent 7a65864 commit bf78fcc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/module/item/physical/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ abstract class PhysicalItemPF2e<TParent extends ActorPF2e | null = ActorPF2e | n
return !!this.container;
}

/** Returns true if any of this item's containers is a stowing container */
get isStowed(): boolean {
return !!this.container?.system.stowing;
const container = this.container;
return !!container && (container.system.stowing || container.isStowed);
}

/** Get this item's container, returning null if it is not in a container */
Expand Down

0 comments on commit bf78fcc

Please sign in to comment.