feat: fallback for gps error

This commit is contained in:
Mat12143 2025-08-02 10:31:29 +02:00
parent e045e11023
commit 5632209ace

View file

@ -9,8 +9,7 @@
onMount(async () => {
let { coords, error } = await get_coords()
if (error != null) return console.log(error)
if (coords == null) return
if (error != null || coords == null) coords = { latitude: 46.6769043, longitude: 11.1851585 }
let res = await fetch(`/api/room?lat=${coords.latitude}&lon=${coords.longitude}`)
let json = await res.json()