Include route=foot in trails

This commit is contained in:
Pieter Vander Vennet 2022-01-25 18:20:15 +01:00
parent b61c0a1180
commit 791c6c4f55
5 changed files with 34 additions and 8 deletions

View file

@ -495,7 +495,10 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
}
const data = await Utils.download(url, Utils.Merge({"accept": "application/json"}, headers ?? {}))
try {
return JSON.parse(data)
if(typeof data === "string"){
return JSON.parse(data)
}
return data
} catch (e) {
console.error("Could not parse ", data, "due to", e, "\n", e.stack)
throw e;