Don't throw when getting potential proxies with invalid URL
This commit is contained in:
parent
ed46d8c53c
commit
93bba41dd5
1 changed files with 4 additions and 2 deletions
|
@ -179,8 +179,10 @@ Zotero.Proxies = new function() {
|
||||||
* @returns {Object} Unproxied url to proxy object
|
* @returns {Object} Unproxied url to proxy object
|
||||||
*/
|
*/
|
||||||
this.getPotentialProxies = function(url) {
|
this.getPotentialProxies = function(url) {
|
||||||
|
try {
|
||||||
// make sure url has a trailing slash
|
// make sure url has a trailing slash
|
||||||
url = new URL(url).href;
|
url = new URL(url).href;
|
||||||
|
} catch (e) { }
|
||||||
var urlToProxy = {};
|
var urlToProxy = {};
|
||||||
// If it's a known proxied URL just return it
|
// If it's a known proxied URL just return it
|
||||||
if (Zotero.Proxies.transparent) {
|
if (Zotero.Proxies.transparent) {
|
||||||
|
|
Loading…
Reference in a new issue