summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2018-09-08 14:37:33 +0200
committerhackademix2018-09-08 14:37:33 +0200
commitb60cbbd49e6d452adeb3abf8cc47ca276000a4db (patch)
tree0160d8d7881b09e55cac34e92b3b76d61793b7e6 /src
parent746655c885023bba91caffaad73aaab298b0da76 (diff)
downloadnoscript-b60cbbd49e6d452adeb3abf8cc47ca276000a4db.tar.gz
noscript-b60cbbd49e6d452adeb3abf8cc47ca276000a4db.tar.xz
noscript-b60cbbd49e6d452adeb3abf8cc47ca276000a4db.zip
Site parsing more resilient to bogus input.
Diffstat (limited to 'src')
-rw-r--r--src/common/Policy.js2
1 files changed, 1 insertions, 1 deletions
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) {