From 50890c93e25c15cd4aaf4f7a7bd5bdb703b3832e Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 12 Jan 2018 00:51:13 -0700 Subject: [PATCH] Declare feature in the correct scope --- src/ol/render/canvas/Replay.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/render/canvas/Replay.js b/src/ol/render/canvas/Replay.js index f2f61d361f..6049b16480 100644 --- a/src/ol/render/canvas/Replay.js +++ b/src/ol/render/canvas/Replay.js @@ -580,10 +580,11 @@ _ol_render_canvas_Replay_.prototype.replay_ = function( // balance between batch size and number of fill/stroke instructions. const batchSize = this.instructions != instructions || this.overlaps ? 0 : 200; + let /** @type {ol.Feature|ol.render.Feature} */ feature; + let x, y; while (i < ii) { const instruction = instructions[i]; const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]); - let /** @type {ol.Feature|ol.render.Feature} */ feature, x, y; switch (type) { case _ol_render_canvas_Instruction_.BEGIN_GEOMETRY: feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);