Shuffle assertions
This commit is contained in:
@@ -1443,8 +1443,8 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
} else if (logo instanceof HTMLElement) {
|
||||
logos[ol.getUid(logo).toString()] = logo;
|
||||
} else if (logo) {
|
||||
ol.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
|
||||
ol.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
|
||||
ol.asserts.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
|
||||
ol.asserts.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
|
||||
logos[logo.src] = logo.href;
|
||||
}
|
||||
}
|
||||
@@ -1473,7 +1473,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
} else if (typeof options.renderer === 'string') {
|
||||
rendererTypes = [options.renderer];
|
||||
} else {
|
||||
ol.assert(false, 46); // Incorrect format for `renderer` option
|
||||
ol.asserts.assert(false, 46); // Incorrect format for `renderer` option
|
||||
}
|
||||
} else {
|
||||
rendererTypes = ol.DEFAULT_RENDERER_TYPES;
|
||||
@@ -1506,7 +1506,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
if (Array.isArray(options.controls)) {
|
||||
controls = new ol.Collection(options.controls.slice());
|
||||
} else {
|
||||
ol.assert(options.controls instanceof ol.Collection,
|
||||
ol.asserts.assert(options.controls instanceof ol.Collection,
|
||||
47); // Expected `controls` to be an array or an `ol.Collection`
|
||||
controls = options.controls;
|
||||
}
|
||||
@@ -1519,7 +1519,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
if (Array.isArray(options.interactions)) {
|
||||
interactions = new ol.Collection(options.interactions.slice());
|
||||
} else {
|
||||
ol.assert(options.interactions instanceof ol.Collection,
|
||||
ol.asserts.assert(options.interactions instanceof ol.Collection,
|
||||
48); // Expected `interactions` to be an array or an `ol.Collection`
|
||||
interactions = options.interactions;
|
||||
}
|
||||
@@ -1532,7 +1532,7 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
if (Array.isArray(options.overlays)) {
|
||||
overlays = new ol.Collection(options.overlays.slice());
|
||||
} else {
|
||||
ol.assert(options.overlays instanceof ol.Collection,
|
||||
ol.asserts.assert(options.overlays instanceof ol.Collection,
|
||||
49); // Expected `overlays` to be an array or an `ol.Collection`
|
||||
overlays = options.overlays;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user