Account for null or undefined geometry
The change in #2098 made it so a feature's geometry could be undefined. This is consistent with the return type for the getGeometry method. Where calling code needs to ensure that it has a geometry instance, it can use instanceof, goog.isDefAndNotNull(), or test for a truthy value.
This commit is contained in:
@@ -96,7 +96,7 @@ ol.render.Box.prototype.disposeInternal = function() {
|
||||
*/
|
||||
ol.render.Box.prototype.handleMapPostCompose_ = function(event) {
|
||||
var geometry = this.geometry_;
|
||||
goog.asserts.assert(!goog.isNull(geometry));
|
||||
goog.asserts.assert(goog.isDefAndNotNull(geometry));
|
||||
var style = this.style_;
|
||||
goog.asserts.assert(!goog.isNull(style));
|
||||
// use drawAsync(Infinity) to draw above everything
|
||||
|
||||
Reference in New Issue
Block a user