Declare feature in the correct scope

This commit is contained in:
Tim Schaub
2018-01-12 00:51:13 -07:00
parent ad62739a6e
commit 50890c93e2

View File

@@ -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]);