diff --git a/src/compile/render-dom/wrappers/IfBlock.ts b/src/compile/render-dom/wrappers/IfBlock.ts index 284cd241de12..3505ec9ce082 100644 --- a/src/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compile/render-dom/wrappers/IfBlock.ts @@ -41,7 +41,7 @@ class IfBlockBranch extends Wrapper { ) }); - this.fragment = new FragmentWrapper(renderer, this.block, node.children, parent.parent, stripWhitespace, nextSibling); + this.fragment = new FragmentWrapper(renderer, this.block, node.children, parent, stripWhitespace, nextSibling); this.isDynamic = this.block.dependencies.size > 0; } diff --git a/test/runtime/samples/each-block-in-if-block/_config.js b/test/runtime/samples/each-block-in-if-block/_config.js new file mode 100644 index 000000000000..2af8c4bcd360 --- /dev/null +++ b/test/runtime/samples/each-block-in-if-block/_config.js @@ -0,0 +1,13 @@ +export default { + data: { + dummy: false, + fruits: ['Apple', 'Banana', 'Tomato'], + }, + + html: '