From 3aeba06f8b8a748fc463a7eeb9f1aaf1975e96fa Mon Sep 17 00:00:00 2001 From: supositware Date: Mon, 13 Sep 2021 17:12:43 +0200 Subject: [PATCH] fix download --- commands/utility/download.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index 38546fea..fea059c1 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -115,7 +115,9 @@ class DownloadCommand extends Command { const params = new URLSearchParams(); params.append('url', args.link.href); - params.append('proxy', proxy[args.proxy].ip); + if (proxy[args.proxy] !== undefined) { + params.append('proxy', proxy[args.proxy].ip); + } fetch(`${Hapi}/download`, {method: 'POST', body: params}) .then(async res => {