mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add eslint no-nested-ternary rule and fix violations
This commit is contained in:
parent
ab5fad6d5b
commit
d895a4fc6a
15 changed files with 89 additions and 30 deletions
|
@ -53,7 +53,12 @@ function disableOneEvent(event) {
|
|||
* @return {Number}
|
||||
*/
|
||||
function within(number, min, max) {
|
||||
return number < min ? min : number > max ? max : number;
|
||||
if (number < min) {
|
||||
return min;
|
||||
} else if (number > max) {
|
||||
return max;
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
// Other global values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue