From 0962f4ffedcd098d25781bc811aecda9cd5dc98a Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Wed, 15 Jun 2022 08:43:04 +1000 Subject: [PATCH] Remove unused variable --- src/drivers/npm/driver.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index b09462124..38cf01994 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -433,7 +433,7 @@ class Site { promise, fallback, errorMessage = 'Operation took too long to complete', - maxWait = this.options.maxWait + maxWait = Math.min(this.options.maxWait, 1000) ) { let timeout = null @@ -955,14 +955,6 @@ class Site { // Continue } - let hostname = url - - try { - ;({ hostname } = new URL(url)) - } catch (error) { - // Continue - } - if (error.message.includes('net::ERR_NAME_NOT_RESOLVED')) { const newError = new Error(`Hostname could not be resolved (${url})`)