diff --git a/src/client/location.ts b/src/client/location.ts index 87068b3..ca35ddc 100644 --- a/src/client/location.ts +++ b/src/client/location.ts @@ -1,18 +1,12 @@ // @ts-nocheck import { encodeUrl, decodeUrl } from "../shared"; -function urlLocation() { +export function LocationProxy() { const loc = new URL(decodeUrl(location.href)); loc.assign = (url: string) => location.assign(encodeUrl(url)); loc.reload = () => location.reload(); loc.replace = (url: string) => location.replace(encodeUrl(url)); loc.toString = () => loc.href; - - return loc; -} - -export function LocationProxy() { - const loc = urlLocation(); return new Proxy(window.location, { get(target, prop) {