From c8e015317e02679f96ab796f65dd70e44f3cef26 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 21 Mar 2018 03:50:26 +0100 Subject: [PATCH] Fixed anime page for undefined relations --- pages/anime/anime.pixy | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/anime/anime.pixy b/pages/anime/anime.pixy index 260990c9..822935ce 100644 --- a/pages/anime/anime.pixy +++ b/pages/anime/anime.pixy @@ -148,12 +148,13 @@ component AnimeRelations(anime *arn.Anime, user *arn.User) h3.anime-section-name Relations .anime-relations each relation in anime.Relations().Items - 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() - .anime-relation-year - if relation.Anime().StartDate != "" - span= relation.Anime().StartDate[:4] + 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() + .anime-relation-year + if relation.Anime().StartDate != "" + span= relation.Anime().StartDate[:4] component AnimeTrailer(anime *arn.Anime) if len(anime.Trailers) > 0 && anime.Trailers[0].Service == "Youtube" && anime.Trailers[0].ServiceID != ""