Fixed bug when viewing anime page logged out

This commit is contained in:
Eduard Urbach 2017-10-20 18:26:23 +02:00
parent d8848c7d56
commit 4801a254f7

View File

@ -1,2 +1,5 @@
component Rating(value float64, user *arn.User) component Rating(value float64, user *arn.User)
if user == nil
.anime-rating= fmt.Sprintf("%.1f", value)
else
.anime-rating= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value) .anime-rating= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)