diff options
| author | WBRK-dev <[email protected]> | 2024-04-20 08:54:44 +0200 |
|---|---|---|
| committer | WBRK-dev <[email protected]> | 2024-04-20 08:54:44 +0200 |
| commit | 44d6ff5a11f41db7776910a4e8fd635352913b06 (patch) | |
| tree | 01c2980ab1f8bba9c7b1106b7ca15ee452a4c456 /src | |
| parent | 47e104438ae4799436105c357ef0b7213bfd8f62 (diff) | |
| download | aniwatch-api-44d6ff5a11f41db7776910a4e8fd635352913b06.tar.xz aniwatch-api-44d6ff5a11f41db7776910a4e8fd635352913b06.zip | |
feat: added new error message
Diffstat (limited to 'src')
| -rw-r--r-- | src/extractors/megacloud.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/extractors/megacloud.ts b/src/extractors/megacloud.ts index 88b6d94..7749ad1 100644 --- a/src/extractors/megacloud.ts +++ b/src/extractors/megacloud.ts @@ -103,6 +103,10 @@ class MegaCloud { } const vars = this.extractVariables(text, "MEGACLOUD"); + if (!vars.length) { + throw new Error("Can't find variables. Perhaps the extractor is outdated."); + } + const { secret, encryptedSource } = this.getSecret( encryptedString as string, vars |
