Shuffle assertions
This commit is contained in:
@@ -101,15 +101,15 @@ ol.style.Icon = function(opt_options) {
|
||||
*/
|
||||
var src = options.src;
|
||||
|
||||
ol.assert(!(src !== undefined && image),
|
||||
ol.asserts.assert(!(src !== undefined && image),
|
||||
4); // `image` and `src` cannot be provided at the same time
|
||||
ol.assert(!image || (image && imgSize),
|
||||
ol.asserts.assert(!image || (image && imgSize),
|
||||
5); // `imgSize` must be set when `image` is provided
|
||||
|
||||
if ((src === undefined || src.length === 0) && image) {
|
||||
src = image.src || ol.getUid(image).toString();
|
||||
}
|
||||
ol.assert(src !== undefined && src.length > 0,
|
||||
ol.asserts.assert(src !== undefined && src.length > 0,
|
||||
6); // A defined and non-empty `src` or `image` must be provided
|
||||
|
||||
/**
|
||||
|
||||
@@ -201,7 +201,7 @@ ol.style.createStyleFunction = function(obj) {
|
||||
if (Array.isArray(obj)) {
|
||||
styles = obj;
|
||||
} else {
|
||||
ol.assert(obj instanceof ol.style.Style,
|
||||
ol.asserts.assert(obj instanceof ol.style.Style,
|
||||
41); // Expected an `ol.style.Style` or an array of `ol.style.Style`
|
||||
styles = [obj];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user