useGeolocation Vite + Vue 3 Returning Infinity #3512
Unanswered
michael-evrythngwrx
asked this question in
Q&A
Replies: 1 comment
-
Hope it will be of help to anyone. You just need to use computed on it. const latNLong = computed(() => {
if (coords) {
return [coords.value.latitude, coords.value.longitude]
}
return
}) I just encountered this problem again. Logging via ref shows a value, but directly accessing latitude / longitude didnt work aka Infinity. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently implementing useGeolocation(); however, when accessing the value of the return the lat and long go to infinity. In the console when I log coords all data props are OK, but when I try and access the props via coords.value -> the props go to null and lat and long change to infinity. Is there a reason this is happening?
Beta Was this translation helpful? Give feedback.
All reactions