Replace !goog.isDefAndNotNull() with falsey checks
This commit is contained in:
@@ -265,7 +265,7 @@ ol.source.ImageVector.prototype.renderFeature_ =
|
||||
} else if (this.styleFunction_) {
|
||||
styles = this.styleFunction_(feature, resolution);
|
||||
}
|
||||
if (!goog.isDefAndNotNull(styles)) {
|
||||
if (!styles) {
|
||||
return false;
|
||||
}
|
||||
var i, ii, loading = false;
|
||||
|
||||
@@ -131,7 +131,7 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
this.template_ = tileJSON.template;
|
||||
|
||||
var grids = tileJSON.grids;
|
||||
if (!goog.isDefAndNotNull(grids)) {
|
||||
if (!grids) {
|
||||
this.setState(ol.source.State.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -705,7 +705,7 @@ ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
|
||||
var feature = /** @type {ol.Feature} */ (event.target);
|
||||
var featureKey = goog.getUid(feature).toString();
|
||||
var geometry = feature.getGeometry();
|
||||
if (!goog.isDefAndNotNull(geometry)) {
|
||||
if (!geometry) {
|
||||
if (!(featureKey in this.nullGeometryFeatures_)) {
|
||||
if (!goog.isNull(this.featuresRtree_)) {
|
||||
this.featuresRtree_.remove(feature);
|
||||
|
||||
Reference in New Issue
Block a user