diff --git a/src/compiler/compile/render_dom/wrappers/EachBlock.ts b/src/compiler/compile/render_dom/wrappers/EachBlock.ts index d73d6dcffd..a6ee015d35 100644 --- a/src/compiler/compile/render_dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/EachBlock.ts @@ -539,7 +539,7 @@ export default class EachBlockWrapper extends Wrapper { // We declare `i` as block scoped here, as the `remove_old_blocks` code // may rely on continuing where this iteration stopped. const update = b` - ${!this.block.has_update_method && `const #old_length = ${this.vars.each_block_value}.length;`} + ${!this.block.has_update_method && b`const #old_length = ${this.vars.each_block_value}.length;`} ${this.vars.each_block_value} = ${snippet}; let #i; diff --git a/test/runtime/samples/transition-js-nested-each/_config.js b/test/runtime/samples/transition-js-nested-each/_config.js index 3d2fe3c32e..c21024dd69 100644 --- a/test/runtime/samples/transition-js-nested-each/_config.js +++ b/test/runtime/samples/transition-js-nested-each/_config.js @@ -4,7 +4,7 @@ export default { things: ['a'] }, - test({ assert, component, target, window, raf }) { + test({ assert, component, target, raf }) { component.x = true; const div = target.querySelector('div');