From d944bdfbb1272c85a60a451ed286b5e0181d0fc8 Mon Sep 17 00:00:00 2001 From: Joshua Pohl Date: Sat, 13 Apr 2024 16:10:53 -0600 Subject: [PATCH] fix: fallback to provided URL if 'feedUrl' cannot be parsed --- bin/bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bin.js b/bin/bin.js index 2f7f7c8..f571381 100755 --- a/bin/bin.js +++ b/bin/bin.js @@ -80,7 +80,7 @@ const main = async () => { ? await getUrlFeed(url, parserConfig) : await getFileFeed(file, parserConfig); - const { hostname, pathname } = new URL(feed.feedUrl); + const { hostname, pathname } = new URL(feed.feedUrl || url); const archiveUrl = `${hostname}${pathname}`; const basePath = _path.resolve( process.cwd(),