From ae14d433f9ff25bfa2772fe58ec7b3225979288a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 15 Nov 2022 13:53:25 +0200 Subject: [PATCH] Don't throw when getting potential proxies with invalid URL --- chrome/content/zotero/xpcom/proxy.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/proxy.js b/chrome/content/zotero/xpcom/proxy.js index e932e7bc47..7a80806ce5 100644 --- a/chrome/content/zotero/xpcom/proxy.js +++ b/chrome/content/zotero/xpcom/proxy.js @@ -179,8 +179,10 @@ Zotero.Proxies = new function() { * @returns {Object} Unproxied url to proxy object */ this.getPotentialProxies = function(url) { - // make sure url has a trailing slash - url = new URL(url).href; + try { + // make sure url has a trailing slash + url = new URL(url).href; + } catch (e) { } var urlToProxy = {}; // If it's a known proxied URL just return it if (Zotero.Proxies.transparent) {