1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove redundant check

This commit is contained in:
viown 2024-11-28 22:48:26 +03:00
parent 9e4e3b0106
commit 63834e164a

View file

@ -164,13 +164,11 @@ const UserParentalControl = () => {
populateRatings(allParentalRatings);
let ratingValue = '';
if (user.Policy?.MaxParentalRating != null) {
allParentalRatings.forEach(rating => {
if (rating.Value != null && user.Policy?.MaxParentalRating != null && user.Policy.MaxParentalRating >= rating.Value) {
ratingValue = `${rating.Value}`;
}
});
}
allParentalRatings.forEach(rating => {
if (rating.Value != null && user.Policy?.MaxParentalRating != null && user.Policy.MaxParentalRating >= rating.Value) {
ratingValue = `${rating.Value}`;
}
});
setMaxParentalRating(ratingValue);