From 2efb942beae0ee6ef77e56fa9d729f190fd6c89a Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 30 Mar 2021 21:56:18 +0200 Subject: [PATCH] Fix typo getEmbeddedDocument --- module/actor-entite-sheet.js | 2 +- module/actor-sheet.js | 6 +++--- module/actor-vehicule-sheet.js | 2 +- module/actor.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/actor-entite-sheet.js b/module/actor-entite-sheet.js index b7a02afd..7b953e00 100644 --- a/module/actor-entite-sheet.js +++ b/module/actor-entite-sheet.js @@ -71,7 +71,7 @@ export class RdDActorEntiteSheet extends ActorSheet { // Update Inventory Item html.find('.item-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getEmbeddedDocuments('Item', li.data("itemId")); + const item = this.actor.getEmbeddedDocument('Item', li.data("itemId")); item.sheet.render(true); }); diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 5cd04ee4..76eaf475 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -407,19 +407,19 @@ export class RdDActorSheet extends ActorSheet { // Display info about queue html.find('.queuesouffle-label a').click((event) => { let myID = event.currentTarget.attributes['data-item-id'].value; - const item = this.actor.getEmbeddedDocuments('Item', myID); + const item = this.actor.getEmbeddedDocument('Item', myID); item.sheet.render(true); }); // Info sort html.find('.sort-label a').click((event) => { let myID = event.currentTarget.attributes['data-id'].value; - const item = this.actor.getEmbeddedDocuments('Item', myID); + const item = this.actor.getEmbeddedDocument('Item', myID); item.sheet.render(true); }); // Info sort html.find('.case-label a').click((event) => { let myID = event.currentTarget.attributes['data-id'].value; - const item = this.actor.getEmbeddedDocuments('Item', myID); + const item = this.actor.getEmbeddedDocument('Item', myID); item.sheet.render(true); }); diff --git a/module/actor-vehicule-sheet.js b/module/actor-vehicule-sheet.js index c6c62235..5ef1944c 100644 --- a/module/actor-vehicule-sheet.js +++ b/module/actor-vehicule-sheet.js @@ -87,7 +87,7 @@ export class RdDActorVehiculeSheet extends ActorSheet { // Update Inventory Item html.find('.item-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); - const item = this.actor.getEmbeddedDocuments('Item', li.data("itemId")); + const item = this.actor.getEmbeddedDocument('Item', li.data("itemId")); item.sheet.render(true); }); // Delete Inventory Item diff --git a/module/actor.js b/module/actor.js index 7c907b2a..2a7c9cdf 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2531,7 +2531,7 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ getArmeParade(armeParadeId) { - const item = armeParadeId ? this.getEmbeddedDocuments('Item', armeParadeId) : undefined; + const item = armeParadeId ? this.getEmbeddedDocument('Item', armeParadeId) : undefined; return RdDItemArme.getArmeData(item); } @@ -2548,7 +2548,7 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async equiperObjet(itemID) { - let item = this.getEmbeddedDocuments('Item', itemID); + let item = this.getEmbeddedDocument('Item', itemID); if (item?.data?.data) { let itemData = Misc.itemData(item); const isEquipe = !itemData.data.equipe;