Fixed anime page for undefined relations

This commit is contained in:
Eduard Urbach 2018-03-21 03:50:26 +01:00
parent 818a77c247
commit c8e015317e

View File

@ -148,6 +148,7 @@ component AnimeRelations(anime *arn.Anime, user *arn.User)
h3.anime-section-name Relations
.anime-relations
each relation in anime.Relations().Items
if relation.Anime() != nil
a.anime-relation.mountable.ajax(href=relation.Anime().Link(), title=relation.Anime().Title.ByUser(user), data-mountable-type="relation")
img.anime-relation-image.lazy(data-src=relation.Anime().ImageLink("small"), data-webp="true", data-color=relation.Anime().AverageColor(), alt=relation.Anime().Title.ByUser(user))
.anime-relation-type= relation.HumanReadableType()