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:
parent
9e4e3b0106
commit
63834e164a
1 changed files with 5 additions and 7 deletions
|
@ -164,13 +164,11 @@ const UserParentalControl = () => {
|
||||||
populateRatings(allParentalRatings);
|
populateRatings(allParentalRatings);
|
||||||
|
|
||||||
let ratingValue = '';
|
let ratingValue = '';
|
||||||
if (user.Policy?.MaxParentalRating != null) {
|
allParentalRatings.forEach(rating => {
|
||||||
allParentalRatings.forEach(rating => {
|
if (rating.Value != null && user.Policy?.MaxParentalRating != null && user.Policy.MaxParentalRating >= rating.Value) {
|
||||||
if (rating.Value != null && user.Policy?.MaxParentalRating != null && user.Policy.MaxParentalRating >= rating.Value) {
|
ratingValue = `${rating.Value}`;
|
||||||
ratingValue = `${rating.Value}`;
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
setMaxParentalRating(ratingValue);
|
setMaxParentalRating(ratingValue);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue