{{!-- Check data.ancestry instead of the ancestry item in case the required ancestry has a broken UUID reference --}}
{{#if data.ancestry}}
{{!-- Reference the retrieved ancestry item's name for localization purposes --}}
{{#if ancestry}}{{ancestry.name}}{{else}}{{data.ancestry.name}}{{/if}}
{{else}}
{{localize "PF2E.Item.Heritage.NoneVersatile"}}
{{/if}}