From 5a927da809e2028cb47f654485e76b85df9a5e23 Mon Sep 17 00:00:00 2001 From: Hygna Date: Wed, 12 Oct 2022 17:07:04 +0100 Subject: Fixed bug where url protocol would appear as undefined Closes https://github.com/libredirect/libredirect/issues/478 --- src/pages/options/widgets/general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pages/options/widgets') diff --git a/src/pages/options/widgets/general.js b/src/pages/options/widgets/general.js index 75701bca..d133617b 100644 --- a/src/pages/options/widgets/general.js +++ b/src/pages/options/widgets/general.js @@ -240,7 +240,7 @@ browser.storage.local.get("options", r => { if (instanceType == "url") { if (nameCustomInstanceInput.validity.valid) { let url = new URL(nameCustomInstanceInput.value) - val = `${url.network}//${url.host}` + val = `${url.protocol}//${url.host}` if (!exceptionsCustomInstances.url.includes(val)) exceptionsCustomInstances.url.push(val) } } else if (instanceType == "regex") { -- cgit 1.4.1