diff --git a/src/module/actor/actor-sheet.ts b/src/module/actor/actor-sheet.ts index e7c16819..a972964b 100644 --- a/src/module/actor/actor-sheet.ts +++ b/src/module/actor/actor-sheet.ts @@ -64,8 +64,8 @@ export class DS4ActorSheet extends ActorSheet { const id = $(ev.currentTarget).parents(".item").data("itemId"); - const item = duplicate(this.actor.getEmbeddedEntity("OwnedItem", id)); - setProperty(item, "data.equipped", !getProperty(item, "data.equipped")); + const item = duplicate(this.actor.getOwnedItem(id)); // getOwnedItem is typed incorrectly, it actually returns a ItemData, not an Item + setProperty(item, "data.equipped", !getProperty(item, "data.equipped")); // TODO: use "."" accessors instead, once typing has been fixed this.actor.updateOwnedItem(item); });