Small fixes

This commit is contained in:
Pieter Vander Vennet 2023-10-17 17:17:19 +02:00
parent 059ef2c1bc
commit 68e9534034
2 changed files with 4 additions and 4 deletions

View file

@ -73,7 +73,7 @@
"lint:prettier": "prettier --check '**/*.ts' '**/*.svelte'", "lint:prettier": "prettier --check '**/*.ts' '**/*.svelte'",
"format": "prettier --write '**/*.ts' '**/*.svelte'", "format": "prettier --write '**/*.ts' '**/*.svelte'",
"clean:tests": "find . -type f -name \"*.doctest.ts\" | xargs -r rm", "clean:tests": "find . -type f -name \"*.doctest.ts\" | xargs -r rm",
"clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|studio\\|theme\\|style_test\\|statistics\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm)", "clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|studio\\|theme\\|style_test\\|statistics\\|leaderboard).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm)",
"generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot", "generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot",
"weblate-add-upstream": "git remote add weblate-github git@github.com:weblate/MapComplete.git && git remote add weblate-hosted-core https://hosted.weblate.org/git/mapcomplete/core/ && git remote add weblate-hosted-layers https://hosted.weblate.org/git/mapcomplete/layers/", "weblate-add-upstream": "git remote add weblate-github git@github.com:weblate/MapComplete.git && git remote add weblate-hosted-core https://hosted.weblate.org/git/mapcomplete/core/ && git remote add weblate-hosted-layers https://hosted.weblate.org/git/mapcomplete/layers/",
"weblate-merge": "git remote update weblate-github; git merge weblate-github/weblate-mapcomplete-core weblate-github/weblate-mapcomplete-layers weblate-github/weblate-mapcomplete-layer-translations", "weblate-merge": "git remote update weblate-github; git merge weblate-github/weblate-mapcomplete-core weblate-github/weblate-mapcomplete-layers weblate-github/weblate-mapcomplete-layer-translations",

View file

@ -119,7 +119,7 @@ export class GeoLocationState {
return return
} }
if(navigator.permissions === undefined && navigator.geolocation !== undefined){ if (navigator.permissions === undefined && navigator.geolocation !== undefined) {
// This is probably safari - we just start watching right away // This is probably safari - we just start watching right away
this.startWatching() this.startWatching()
return return
@ -158,8 +158,8 @@ export class GeoLocationState {
self.currentGPSLocation.setData(position.coords) self.currentGPSLocation.setData(position.coords)
self._previousLocationGrant.setData("true") self._previousLocationGrant.setData("true")
}, },
function () { function (e) {
console.warn("Could not get location with navigator.geolocation") console.warn("Could not get location with navigator.geolocation due to", e)
}, },
{ {
enableHighAccuracy: true, enableHighAccuracy: true,