Shuffle assertions

This commit is contained in:
Tim Schaub
2016-08-09 00:05:25 -06:00
parent c40e1bc29b
commit d02cf1e7a9
39 changed files with 154 additions and 143 deletions
+3 -3
View File
@@ -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
/**
+1 -1
View File
@@ -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];
}