Made start date render more robust

This commit is contained in:
Eduard Urbach 2018-04-25 23:10:12 +02:00
parent 526a7998bb
commit cac41b0323

View File

@ -15,5 +15,5 @@ component AnimeRelations(anime *arn.Anime, user *arn.User, standAlonePage bool)
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 != ""
if len(relation.Anime().StartDate) >= 4
span= relation.Anime().StartDate[:4]