Fix nogo area loading via URL (#405)

This commit is contained in:
Gautier P 2021-05-08 15:54:30 +02:00
parent 8fff1d15cd
commit 7abd8d61dc

View file

@ -189,9 +189,7 @@ BR.NogoAreas = L.Control.extend({
$('#nogoJSON').val(undefined);
} else if (nogoURL) {
// TODO: Handle {{bbox}}
geoJSONPromise = fetch(nogoURL).then(function (response) {
response.json();
});
geoJSONPromise = fetch(nogoURL).then((response) => response.json());
} else if (nogoFile) {
geoJSONPromise = new Promise(function (resolve, reject) {
var reader = new FileReader();