Remove goog.isDefAndNotNull() from vector sources

This commit is contained in:
Tim Schaub
2015-09-29 09:48:19 -06:00
parent 871575607f
commit 1aca93d297
2 changed files with 4 additions and 6 deletions

View File

@@ -450,8 +450,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
return this.forEachFeatureInExtent(extent, function(feature) {
var geometry = feature.getGeometry();
goog.asserts.assert(goog.isDefAndNotNull(geometry),
'feature geometry is defined and not null');
goog.asserts.assert(geometry, 'feature geometry is defined and not null');
if (geometry.containsCoordinate(coordinate)) {
return callback.call(opt_this, feature);
} else {
@@ -533,7 +532,7 @@ ol.source.Vector.prototype.forEachFeatureIntersectingExtent =
*/
function(feature) {
var geometry = feature.getGeometry();
goog.asserts.assert(goog.isDefAndNotNull(geometry),
goog.asserts.assert(geometry,
'feature geometry is defined and not null');
if (geometry.intersectsExtent(extent)) {
var result = callback.call(opt_this, feature);
@@ -645,7 +644,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate =
*/
function(feature) {
var geometry = feature.getGeometry();
goog.asserts.assert(goog.isDefAndNotNull(geometry),
goog.asserts.assert(geometry,
'feature geometry is defined and not null');
var previousMinSquaredDistance = minSquaredDistance;
minSquaredDistance = geometry.closestPointXY(