Inline simple !goog.isDef() calls

This commit is contained in:
Tim Schaub
2015-09-27 10:31:16 -06:00
parent 3a0683f373
commit a86c270f6a
11 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -108,13 +108,13 @@ ol.style.Icon = function(opt_options) {
goog.asserts.assert(!(goog.isDef(src) && !goog.isNull(image)),
'image and src can not provided at the same time');
goog.asserts.assert(
!goog.isDef(src) || (goog.isDef(src) && goog.isNull(imgSize)),
src === undefined || (goog.isDef(src) && goog.isNull(imgSize)),
'imgSize should not be set when src is provided');
goog.asserts.assert(
goog.isNull(image) || (!goog.isNull(image) && !goog.isNull(imgSize)),
'imgSize must be set when image is provided');
if ((!goog.isDef(src) || src.length === 0) && !goog.isNull(image)) {
if ((src === undefined || src.length === 0) && !goog.isNull(image)) {
src = image.src;
}
goog.asserts.assert(goog.isDef(src) && src.length > 0,