From 4801a254f7f6a141e2cb039c86488438265cc1f0 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 20 Oct 2017 18:26:23 +0200 Subject: [PATCH] Fixed bug when viewing anime page logged out --- mixins/Rating.pixy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mixins/Rating.pixy b/mixins/Rating.pixy index d9479160..775f6a82 100644 --- a/mixins/Rating.pixy +++ b/mixins/Rating.pixy @@ -1,2 +1,5 @@ component Rating(value float64, user *arn.User) - .anime-rating= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value) \ No newline at end of file + if user == nil + .anime-rating= fmt.Sprintf("%.1f", value) + else + .anime-rating= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value) \ No newline at end of file