From a93f089765bcc89aba482c1e4fba07e1d77b896c Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 25 Jun 2019 10:49:03 -0400 Subject: [PATCH] doh --- src/compiler/compile/render_dom/wrappers/EachBlock.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/EachBlock.ts b/src/compiler/compile/render_dom/wrappers/EachBlock.ts index c2f6c50249..06d8d5593f 100644 --- a/src/compiler/compile/render_dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/EachBlock.ts @@ -463,7 +463,7 @@ export default class EachBlockWrapper extends Wrapper { } `; - const start = this.block.has_update_method ? '0' : `old_length`; + const start = this.block.has_update_method ? '0' : `#old_length`; let remove_old_blocks; @@ -482,7 +482,7 @@ export default class EachBlockWrapper extends Wrapper { `; } else { remove_old_blocks = deindent` - for (${this.block.has_update_method ? `` : `#i = ${this.vars.each_block_value}.${length}`}; #i < ${this.block.has_update_method ? view_length : 'old_length'}; #i += 1) { + for (${this.block.has_update_method ? `` : `#i = ${this.vars.each_block_value}.${length}`}; #i < ${this.block.has_update_method ? view_length : '#old_length'}; #i += 1) { ${iterations}[#i].d(1); } ${!fixed_length && `${view_length} = ${this.vars.each_block_value}.${length};`} @@ -490,7 +490,7 @@ export default class EachBlockWrapper extends Wrapper { } const update = deindent` - ${!this.block.has_update_method && `const old_length = ${this.vars.each_block_value}.length;`} + ${!this.block.has_update_method && `const #old_length = ${this.vars.each_block_value}.length;`} ${this.vars.each_block_value} = ${snippet}; for (var #i = ${start}; #i < ${this.vars.each_block_value}.${length}; #i += 1) {