Browse Source

fix: remove GlobalThis and use window instead

pull/483/head
Dan Ditomaso 1 year ago
parent
commit
4d0d1da691
  1. 4
      src/components/PageComponents/Connect/HTTP.tsx

4
src/components/PageComponents/Connect/HTTP.tsx

@ -26,10 +26,10 @@ export const HTTP = ({ closeDialog }: TabElementProps) => {
const { control, handleSubmit, register } = useForm<FormData>({ const { control, handleSubmit, register } = useForm<FormData>({
defaultValues: { defaultValues: {
ip: ["client.meshtastic.org", "localhost"].includes( ip: ["client.meshtastic.org", "localhost"].includes(
globalThis.location.hostname, window.location.hostname,
) )
? "meshtastic.local" ? "meshtastic.local"
: globalThis.location.host, : window.location.host,
tls: isURLHTTPS ? true : false, tls: isURLHTTPS ? true : false,
}, },
}); });

Loading…
Cancel
Save