Inline simple goog.isDef() calls

This commit is contained in:
Tim Schaub
2015-09-27 10:34:44 -06:00
parent a86c270f6a
commit e3951fa3c6
45 changed files with 172 additions and 170 deletions
+2 -2
View File
@@ -166,7 +166,7 @@ ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
* @return {?} Callback result.
*/
function(feature) {
goog.asserts.assert(goog.isDef(feature), 'passed a feature');
goog.asserts.assert(feature !== undefined, 'passed a feature');
var key = goog.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
@@ -290,7 +290,7 @@ ol.source.ImageVector.prototype.renderFeature_ =
* @api stable
*/
ol.source.ImageVector.prototype.setStyle = function(style) {
this.style_ = goog.isDef(style) ? style : ol.style.defaultStyleFunction;
this.style_ = style !== undefined ? style : ol.style.defaultStyleFunction;
this.styleFunction_ = goog.isNull(style) ?
undefined : ol.style.createStyleFunction(this.style_);
this.changed();