diff options
author | hackademix | 2018-09-08 14:37:33 +0200 |
---|---|---|
committer | hackademix | 2018-09-08 14:37:33 +0200 |
commit | b60cbbd49e6d452adeb3abf8cc47ca276000a4db (patch) | |
tree | 0160d8d7881b09e55cac34e92b3b76d61793b7e6 /src | |
parent | 746655c885023bba91caffaad73aaab298b0da76 (diff) | |
download | noscript-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.js | 2 |
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) { |