- Create an item in a compendium;
- Give it to an NPC (should be added as gear);
- Delete the original item from the compendium;
- call
asGear() on the item, or getGear() on the actor.
Seems like in this section of asGear() the check on item should happen before trying to get its name.
if ( this.metadata.compendiumGearSource && this.parent._stats.compendiumSource && (flags.preserve !== true) ) {
const item = await fromUuid(this.parent._stats.compendiumSource);
const name = (flags.preserveName === true ? this.parent._source.name : flags.preserveName) ?? item.name;
if ( item ) clone = item.clone({ ...change, name, "system.quantity": this.quantity }, { keepId: true });
}
asGear()on the item, orgetGear()on the actor.Seems like in this section of
asGear()the check onitemshould happen before trying to get its name.