api/youtube: make sure language exists when checking for hls dubs

oops
This commit is contained in:
wukko 2024-10-30 22:55:50 +06:00
parent 8f89c7f412
commit 406ac7613c
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -271,7 +271,7 @@ export default async function(o) {
if (o.dubLang) {
const dubbedAudio = selected.audio.find(i =>
i.language.startsWith(o.dubLang)
i.language?.startsWith(o.dubLang)
);
if (dubbedAudio && !dubbedAudio.isDefault) {