From 7008a9e3d44c44fa6797b940b9e0493ada47a376 Mon Sep 17 00:00:00 2001 From: Erik Borgeteien Hansen <erik@erikbhan.no> Date: Thu, 5 May 2022 11:30:03 +0200 Subject: [PATCH] validate rating --- src/components/UserProfileComponents/UserListItemCard.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/UserProfileComponents/UserListItemCard.vue b/src/components/UserProfileComponents/UserListItemCard.vue index de15de2..4bbbafe 100644 --- a/src/components/UserProfileComponents/UserListItemCard.vue +++ b/src/components/UserProfileComponents/UserListItemCard.vue @@ -137,6 +137,8 @@ export default { ); if (isNaN(maybeRating)) this.rating = NaN; else this.rating = maybeRating; + if (this.rating > 5) this.rating = 5; + if (this.rating < 1) this.rating = 1; this.communityID = this.$route.params.communityID; }, }; -- GitLab