feat: fallback for gps error
This commit is contained in:
parent
e045e11023
commit
5632209ace
1 changed files with 1 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue