summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2018-09-05 15:50:27 +0200
committerhackademix2018-09-05 15:50:27 +0200
commitec0d7b4aff0a383a7c611e9fd18e5813f7fbfad6 (patch)
treef020ae6c69ff8bed4c7c6160f0199bb8cb5aab88 /src
parentce5d46ead25289ba5ad9d4725283be26988f4ebf (diff)
downloadnoscript-ec0d7b4aff0a383a7c611e9fd18e5813f7fbfad6.tar.gz
noscript-ec0d7b4aff0a383a7c611e9fd18e5813f7fbfad6.tar.xz
noscript-ec0d7b4aff0a383a7c611e9fd18e5813f7fbfad6.zip
Fixed possible null reference errors in Sites.origin().
Diffstat (limited to 'src')
-rw-r--r--src/common/Policy.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/Policy.js b/src/common/Policy.js
index 3c5e498..c265f17 100644
--- a/src/common/Policy.js
+++ b/src/common/Policy.js
@@ -80,6 +80,7 @@ var {Permissions, Policy, Sites} = (() => {
}
static origin(site) {
+ if (!site) return "";
try {
let objUrl = site.href ? site : new URL(site);
let origin = objUrl.origin;