fix: use url.toString()
This commit is contained in:
parent
59cadac430
commit
02c2a59938
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue