Named export for ol/asserts
This commit is contained in:
@@ -7,7 +7,7 @@ import _ol_Collection_ from '../Collection.js';
|
||||
import _ol_CollectionEventType_ from '../CollectionEventType.js';
|
||||
import _ol_ObjectEventType_ from '../ObjectEventType.js';
|
||||
import _ol_array_ from '../array.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import {assert} from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import Event from '../events/Event.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
@@ -71,7 +71,7 @@ var _ol_source_Vector_ = function(opt_options) {
|
||||
if (options.loader !== undefined) {
|
||||
this.loader_ = options.loader;
|
||||
} else if (this.url_ !== undefined) {
|
||||
_ol_asserts_.assert(this.format_, 7); // `format` must be set when `url` is set
|
||||
assert(this.format_, 7); // `format` must be set when `url` is set
|
||||
// create a XHR feature loader for "url" and "format"
|
||||
this.loader_ = xhr(this.url_, /** @type {ol.format.Feature} */ (this.format_));
|
||||
}
|
||||
@@ -228,7 +228,7 @@ _ol_source_Vector_.prototype.addToIndex_ = function(featureKey, feature) {
|
||||
valid = false;
|
||||
}
|
||||
} else {
|
||||
_ol_asserts_.assert(!(featureKey in this.undefIdIndex_),
|
||||
assert(!(featureKey in this.undefIdIndex_),
|
||||
30); // The passed `feature` was already added to the source
|
||||
this.undefIdIndex_[featureKey] = feature;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user