diff --git a/src/generators/dom/visitors/IfBlock.ts b/src/generators/dom/visitors/IfBlock.ts index 117f979252..e7fecebefe 100644 --- a/src/generators/dom/visitors/IfBlock.ts +++ b/src/generators/dom/visitors/IfBlock.ts @@ -395,7 +395,7 @@ function compoundWithOutros( if (dynamic) { block.builders.update.addBlock(deindent` var ${previous_block_index} = ${current_block_index}; - ${current_block_index} = ${get_block}( state ); + ${current_block_index} = ${get_block}( ${params} ); if ( ${current_block_index} === ${previous_block_index} ) { ${if_current_block_index}${if_blocks}[ ${current_block_index} ].update( changed, ${params} ); } else { @@ -405,7 +405,7 @@ function compoundWithOutros( } else { block.builders.update.addBlock(deindent` var ${previous_block_index} = ${current_block_index}; - ${current_block_index} = ${get_block}( state ); + ${current_block_index} = ${get_block}( ${params} ); if ( ${current_block_index} !== ${previous_block_index} ) { ${changeBlock} } diff --git a/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/_config.js b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/_config.js new file mode 100644 index 0000000000..60115a0351 --- /dev/null +++ b/test/runtime/samples/transition-js-if-block-in-each-block-bidi-2/_config.js @@ -0,0 +1,32 @@ +export default { + data: { + foo: false, + threshold: 5 + }, + + html: ` +