forked from MapComplete/MapComplete
Include route=foot in trails
This commit is contained in:
parent
b61c0a1180
commit
791c6c4f55
5 changed files with 34 additions and 8 deletions
5
Utils.ts
5
Utils.ts
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue