From c3c079731e68288b9066e0b5e0db3723e97d42cc Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 12 Jul 2021 17:13:18 +0200 Subject: [PATCH] Fixed equipment creating ghost items on drag if the equipment folder is deleted from the character --- .../characterSheetTabs/InventoryTab.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue b/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue index 1c78e5f2..1b79ed03 100644 --- a/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue +++ b/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue @@ -183,10 +183,24 @@ export default { }); }, equipmentParentRef(){ - return getParentRefByTag(this.creatureId, BUILT_IN_TAGS.equipment); + return getParentRefByTag( + this.creatureId, BUILT_IN_TAGS.equipment + ) || getParentRefByTag( + this.creatureId, BUILT_IN_TAGS.inventory + ) || { + id: this.creatureId, + collection: 'creatures' + }; }, carriedParentRef(){ - return getParentRefByTag(this.creatureId, BUILT_IN_TAGS.carried); + return getParentRefByTag( + this.creatureId, BUILT_IN_TAGS.carried + ) || getParentRefByTag( + this.creatureId, BUILT_IN_TAGS.inventory + ) || { + id: this.creatureId, + collection: 'creatures' + }; }, }, computed: {