summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/popup.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/popup.js b/src/ui/popup.js
index c876ed7..aed981b 100644
--- a/src/ui/popup.js
+++ b/src/ui/popup.js
@@ -183,8 +183,12 @@ addEventListener("unload", e => {
if (domains.has(origin)) {
if (justDomains) return domains.get(origin);
} else {
- let domain = tld.getDomain(url.hostname) || origin;
- domain = url.protocol === "https:" ? Sites.secureDomainKey(domain) : domain;
+ let domain = tld.getDomain(url.hostname);
+ if (domain) {
+ domain = url.protocol === "https:" ? Sites.secureDomainKey(domain) : domain;
+ } else {
+ domain = url.protocol;
+ }
domains.set(origin, domain);
if (justDomains) return domain;
}