Don’t crash if feature loader xhr response returns 500

This commit is contained in:
Aleš Jiránek
2017-03-06 11:15:16 +01:00
parent c215a1c50f
commit 9c20a5eec8

View File

@@ -64,6 +64,12 @@ ol.featureloader.loadFeaturesXhr = function(url, format, success, failure) {
failure.call(this);
}
}.bind(this);
/**
* @private
*/
xhr.onerror = function() {
failure.call(this);
}.bind(this);
xhr.send();
});
};