Remove gratuitous debug assertions

This commit is contained in:
Andreas Hocevar
2016-08-04 11:01:40 +02:00
parent e0015b3d4e
commit e18d41b5e0
38 changed files with 12 additions and 102 deletions

View File

@@ -604,9 +604,6 @@ ol.style.IconImage_.prototype.replaceColor_ = function() {
return;
}
goog.DEBUG && console.assert(this.canvas_ !== null,
'this.canvas_ must not be null');
this.canvas_.width = this.image_.width;
this.canvas_.height = this.image_.height;
@@ -634,8 +631,6 @@ ol.style.IconImage_.prototype.replaceColor_ = function() {
* @private
*/
ol.style.IconImage_.prototype.unlistenImage_ = function() {
goog.DEBUG && console.assert(this.imageListenerKeys_,
'we must have listeners registered');
this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
this.imageListenerKeys_ = null;
};

View File

@@ -335,6 +335,5 @@ ol.style.createDefaultEditingStyles = function() {
* @return {ol.geom.Geometry|ol.render.Feature|undefined} Geometry to render.
*/
ol.style.defaultGeometryFunction = function(feature) {
goog.DEBUG && console.assert(feature, 'feature must not be null');
return feature.getGeometry();
};