Browse Source
Merge pull request #483 from danditomaso/fix/restore-window-to-http
fix: remove GlobalThis and use window instead
pull/484/head
Dan Ditomaso
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
src/components/PageComponents/Connect/HTTP.tsx
|
|
|
@ -26,10 +26,10 @@ export const HTTP = ({ closeDialog }: TabElementProps) => { |
|
|
|
const { control, handleSubmit, register } = useForm<FormData>({ |
|
|
|
defaultValues: { |
|
|
|
ip: ["client.meshtastic.org", "localhost"].includes( |
|
|
|
globalThis.location.hostname, |
|
|
|
window.location.hostname, |
|
|
|
) |
|
|
|
? "meshtastic.local" |
|
|
|
: globalThis.location.host, |
|
|
|
: window.location.host, |
|
|
|
tls: isURLHTTPS ? true : false, |
|
|
|
}, |
|
|
|
}); |
|
|
|
|