Fixed possible null reference errors in Sites.origin().

This commit is contained in:
hackademix 2018-09-05 15:50:27 +02:00
parent ce5d46ead2
commit ec0d7b4aff
1 changed files with 1 additions and 0 deletions

View File

@ -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;