From b60cbbd49e6d452adeb3abf8cc47ca276000a4db Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 8 Sep 2018 14:37:33 +0200 Subject: Site parsing more resilient to bogus input. --- src/common/Policy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/Policy.js b/src/common/Policy.js index c265f17..ca3c04c 100644 --- a/src/common/Policy.js +++ b/src/common/Policy.js @@ -58,7 +58,7 @@ var {Permissions, Policy, Sites} = (() => { try { url = new URL(site); } catch (e) { - siteKey = typeof site === "string" ? site : site.toString(); + siteKey = site ? (typeof site === "string" ? site : site.toString()) : ""; } } if (url) { -- cgit v1.2.3