diff --git a/src/ol/feature.js b/src/ol/feature.js index 47551875d5..3742770cd9 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -98,7 +98,7 @@ ol.Feature = function(opt_geometryOrProperties) { if (opt_geometryOrProperties !== undefined) { if (opt_geometryOrProperties instanceof ol.geom.Geometry || - goog.isNull(opt_geometryOrProperties)) { + !opt_geometryOrProperties) { var geometry = /** @type {ol.geom.Geometry} */ (opt_geometryOrProperties); this.setGeometry(geometry); } else { @@ -127,7 +127,7 @@ ol.Feature.prototype.clone = function() { clone.setGeometry(geometry.clone()); } var style = this.getStyle(); - if (!goog.isNull(style)) { + if (style) { clone.setStyle(style); } return clone; @@ -209,7 +209,7 @@ ol.Feature.prototype.handleGeometryChange_ = function() { * @private */ ol.Feature.prototype.handleGeometryChanged_ = function() { - if (!goog.isNull(this.geometryChangeKey_)) { + if (this.geometryChangeKey_) { goog.events.unlistenByKey(this.geometryChangeKey_); this.geometryChangeKey_ = null; } @@ -245,7 +245,7 @@ ol.Feature.prototype.setGeometry = function(geometry) { */ ol.Feature.prototype.setStyle = function(style) { this.style_ = style; - this.styleFunction_ = goog.isNull(style) ? + this.styleFunction_ = !style ? undefined : ol.Feature.createStyleFunction(style); this.changed(); };