From 02c2a59938e45caabbaddfbbf06a714df9c9d589 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 16 Oct 2023 19:50:58 -0400 Subject: [PATCH] fix: use url.toString() --- src/components/Browser.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/Browser.tsx b/src/components/Browser.tsx index 058e5e6..c34c661 100644 --- a/src/components/Browser.tsx +++ b/src/components/Browser.tsx @@ -146,10 +146,7 @@ export function Navigator() { // Try to parse it as a URL const url = new URL(input); - setUrl( - `${url.hostname}${url.pathname}${url.search}${url.hash}` || - "about:blank", - ); + setUrl(url.toString() || "about:blank"); } catch (e) { // Handle invalid URLs here, if needed console.error("Invalid URL:", e);