Skip to content

best way to save what you love

tiktok: replace filter with find

wukko299b46e940bf
diff --git a/src/modules/processing/services/tiktok.js b/src/modules/processing/services/tiktok.js
index ef74c0b9..c7645211 100644
--- a/src/modules/processing/services/tiktok.js
+++ b/src/modules/processing/services/tiktok.js
@@ -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,