Fix runtime error detection

This commit is contained in:
pietervdvn 2021-08-24 10:48:44 +02:00
parent 5738f8efb1
commit 54c0d0890c

View file

@ -37,7 +37,7 @@ export class Overpass {
}
Utils.downloadJson(query)
.then(json => {
if (json.elements === [] && (json.remarks.indexOf("runtime error") > 0)) {
if (json.elements === [] && ((json.remarks ?? json.remark).indexOf("runtime error") >= 0)) {
console.log("Timeout or other runtime error");
onFail("Runtime error (timeout)")
return;