tiktok: replace filter with find

This commit is contained in:
wukko 2024-03-29 06:42:01 +06:00
parent 18545e7c91
commit 299b46e940

View file

@ -39,7 +39,7 @@ export default async function(obj) {
}
}).then((r) => { return r.json() }).catch(() => { return false });
detail = detail?.aweme_list?.filter(v => v.aweme_id === postId)[0];
detail = detail?.aweme_list?.find(v => v.aweme_id === postId);
if (!detail) return { error: 'ErrorCouldntFetch' };
let video, videoFilename, audioFilename, isMp3, audio, images,