From 1a3e33cbc99fecd0b21f78922174574241d21ac5 Mon Sep 17 00:00:00 2001 From: JackEnx Date: Wed, 15 May 2024 23:21:06 -0300 Subject: [PATCH] fix/null-error --- package.json | 2 +- src/main/services/repack-tracker/online-fix.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 31c75072..7878b902 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydra", - "version": "1.2.0", + "version": "1.2.1", "description": "Hydra", "main": "./out/main/index.js", "author": "Los Broxas", diff --git a/src/main/services/repack-tracker/online-fix.ts b/src/main/services/repack-tracker/online-fix.ts index 70373876..68f8d214 100644 --- a/src/main/services/repack-tracker/online-fix.ts +++ b/src/main/services/repack-tracker/online-fix.ts @@ -146,6 +146,8 @@ export const getNewRepacksFromOnlineFix = async ( ); worker.once("message", (torrent) => { + if (!torrent) return; + repacks.push({ fileSize: formatBytes(torrent.length ?? 0), magnet: toMagnetURI(torrent),