From 401caa61ba3e3920e4c501861fefc195950c6683 Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Wed, 4 Aug 2021 11:46:46 +1000 Subject: [PATCH] Fix ping issue --- src/drivers/webextension/js/driver.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index a8e614324..7b78b806d 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -482,12 +482,12 @@ const Driver = { incrementHits = false, analyzeRequires = true ) { - url = url.split('#')[0] - if (!url || !detections.length) { return } + url = url.split('#')[0] + const { hostname } = new URL(url) // Cache detections @@ -838,11 +838,11 @@ const Driver = { const hostnames = Object.keys(Driver.cache.hostnames).reduce( (hostnames, hostname) => { // eslint-disable-next-line standard/computed-property-even-spacing - const { url, language, detections, hits } = + const { language, detections, hits } = Driver.cache.hostnames[hostname] if (!hostnameIgnoreList.test(hostname) && hits >= 3) { - hostnames[url] = hostnames[url] || { + hostnames[hostname] = hostnames[hostname] || { applications: resolve(detections).reduce( (technologies, { name, confidence, version }) => { if (confidence === 100) {