This commit is contained in:
2022-01-12 09:19:08 +01:00
parent 9a94798102
commit c28c7d8c0d
3 changed files with 5 additions and 5 deletions

View File

@ -75,13 +75,13 @@ export class YggdrasillItemSheet extends ItemSheet {
// Update Inventory Item
html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item");
const item = this.object.options.actor.getOwnedItem(li.data("item-id"));
const item = this.object.options.actor.items.get(li.data("item-id"));
item.sheet.render(true);
});
// Update Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.object.options.actor.deleteOwnedItem( li.data("item-id") ).then( this.render(true));
this.object.options.actor.deleteEmbeddedDocuments( "Item", [li.data("item-id") ] ).then( this.render(true));
});
}