Move the nullFunction to ol/functions

And rename it to `UNDEFINED`.
This commit is contained in:
Frederic Junod
2018-03-01 10:52:23 +01:00
parent a30d9a41b8
commit b50a47114e
21 changed files with 72 additions and 63 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
/**
* @module ol/featureloader
*/
import {nullFunction} from './index.js';
import {UNDEFINED} from './functions.js';
import FormatType from './format/FormatType.js';
import {parse} from './xml.js';
@@ -88,11 +88,11 @@ export function loadFeaturesXhr(url, format, success, failure) {
export function xhr(url, format) {
return loadFeaturesXhr(url, format,
/**
* @param {Array.<ol.Feature>} features The loaded features.
* @param {ol.proj.Projection} dataProjection Data projection.
* @this {ol.source.Vector}
*/
* @param {Array.<ol.Feature>} features The loaded features.
* @param {ol.proj.Projection} dataProjection Data projection.
* @this {ol.source.Vector}
*/
function(features, dataProjection) {
this.addFeatures(features);
}, /* FIXME handle error */ nullFunction);
}, /* FIXME handle error */ UNDEFINED);
}