From ec0d7b4aff0a383a7c611e9fd18e5813f7fbfad6 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 5 Sep 2018 15:50:27 +0200 Subject: Fixed possible null reference errors in Sites.origin(). --- src/common/Policy.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/common') 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; -- cgit v1.2.3