mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-12 13:17:45 +02:00
api/youtube: use Math.min instead of ternary operator
This commit is contained in:
@ -240,7 +240,7 @@ export default async function (o) {
|
||||
const quality = o.quality === "max" ? 9000 : Number(o.quality);
|
||||
|
||||
const normalizeQuality = res => {
|
||||
const shortestSide = res.height > res.width ? res.width : res.height;
|
||||
const shortestSide = Math.min(res.height, res.width);
|
||||
return videoQualities.find(qual => qual >= shortestSide);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user