diff --git a/src/ol/render/canvas/polygonreplay.js b/src/ol/render/canvas/polygonreplay.js index d60ea7938c..d5f5c76ce2 100644 --- a/src/ol/render/canvas/polygonreplay.js +++ b/src/ol/render/canvas/polygonreplay.js @@ -80,9 +80,6 @@ ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ = function(flatCo var fill = state.fillStyle !== undefined; var stroke = state.strokeStyle != undefined; var numEnds = ends.length; - if (!fill && !stroke) { - return ends[numEnds - 1]; - } var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH]; this.instructions.push(beginPathInstruction); this.hitDetectionInstructions.push(beginPathInstruction); @@ -178,11 +175,9 @@ ol.render.canvas.PolygonReplay.prototype.drawCircle = function(circleGeometry, f ol.render.canvas.PolygonReplay.prototype.drawPolygon = function(polygonGeometry, feature) { var state = this.state_; ol.DEBUG && console.assert(state, 'state should not be null'); - var fillStyle = state.fillStyle; var strokeStyle = state.strokeStyle; - if (fillStyle === undefined && strokeStyle === undefined) { - return; - } + ol.DEBUG && console.assert(state.fillStyle === undefined && strokeStyle === undefined, + 'fillStyle or strokeStyle should be defined'); if (strokeStyle !== undefined) { ol.DEBUG && console.assert(state.lineWidth !== undefined, 'state.lineWidth should be defined');