Fixed equipment creating ghost items on drag if the equipment folder is deleted from the character

This commit is contained in:
Stefan Zermatten
2021-07-12 17:13:18 +02:00
parent 039b7046b2
commit c3c079731e

View File

@@ -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: {