From 7555d9b8bcf82f13bc151827b460d1aabc0e054b Mon Sep 17 00:00:00 2001 From: evilsloth Date: Sun, 2 Jun 2024 15:55:33 +0200 Subject: [PATCH] fix error on no results from jackett --- src/common/scrapers/jackett/jackett-scraper.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/scrapers/jackett/jackett-scraper.service.ts b/src/common/scrapers/jackett/jackett-scraper.service.ts index 556baf6..549b4c1 100644 --- a/src/common/scrapers/jackett/jackett-scraper.service.ts +++ b/src/common/scrapers/jackett/jackett-scraper.service.ts @@ -76,6 +76,10 @@ export class JackettScraperService implements ScraperService { } private getScraperSources(items: any[]): ScraperSource[] { + if (!items) { + return []; + } + return items .map((item) => this.toScraperSource(item)) .filter((source: ScraperSource) => source.hash != null);