<div class="entity-item-snippet">
@if($showPath ?? false)
- @if($entity->book_id)
+ @if($entity->relationLoaded('book') && $entity->book)
<span class="text-book">{{ $entity->book->getShortName(42) }}</span>
- @if($entity->chapter_id)
+ @if($entity->relationLoaded('chapter') && $entity->chapter)
<span class="text-muted entity-list-item-path-sep">@icon('chevron-right')</span> <span class="text-chapter">{{ $entity->chapter->getShortName(42) }}</span>
@endif
@endif