Skip to content

Commit

Permalink
fix(megacloud): extracted sources undefined case
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshRitesh12 committed Dec 19, 2024
1 parent d738b01 commit 559d7af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extractors/megacloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ class MegaCloud {
const xrax = embedIframeURL.pathname.split("/").pop() || "";

const resp = await getSources(xrax);
if (!resp) return extractedData;

if (Array.isArray(resp.sources)) {
extractedData.sources = resp.sources.map((s) => ({
url: s.file,
Expand Down

0 comments on commit 559d7af

Please sign in to comment.