Fixed possible null reference errors in Sites.origin().
This commit is contained in:
parent
ce5d46ead2
commit
ec0d7b4aff
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue