Skip to content

Commit ca0967f

Browse files
committed
added geolocation true for iphone
1 parent a51da18 commit ca0967f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/App.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function App() {
4545
const updateLocation = () => {
4646
if (lat === null || long === null) {
4747
navigator.geolocation.getCurrentPosition((position) => {
48+
setHasAllowedGeolocation(true);
4849
setLat(position.coords.latitude);
4950
setLong(position.coords.longitude);
5051
setHeading(position.coords.heading);
@@ -53,6 +54,7 @@ function App() {
5354
}
5455
setTimeout(() => {
5556
navigator.geolocation.getCurrentPosition((position) => {
57+
setHasAllowedGeolocation(true);
5658
setLat(position.coords.latitude);
5759
setLong(position.coords.longitude);
5860
setHeading(position.coords.heading);

0 commit comments

Comments
 (0)