diff --git a/src/compile/render-dom/wrappers/Fragment.ts b/src/compile/render-dom/wrappers/Fragment.ts index 20c200fe58..066daa2720 100644 --- a/src/compile/render-dom/wrappers/Fragment.ts +++ b/src/compile/render-dom/wrappers/Fragment.ts @@ -120,10 +120,6 @@ export default class FragmentWrapper { if (!first.data) { first.var = null; this.nodes.shift(); - - if (this.nodes.length) { - link(null, this.nodes[0]); - } } } } diff --git a/test/runtime/samples/if-block-first/_config.js b/test/runtime/samples/if-block-first/_config.js new file mode 100644 index 0000000000..e7020cbf8c --- /dev/null +++ b/test/runtime/samples/if-block-first/_config.js @@ -0,0 +1,12 @@ +export default { + data: { + visible: false + }, + + html: '
before me
', + + test ( assert, component, target ) { + component.set({ visible: true }); + assert.htmlEqual(target.innerHTML, '
i am visible
before me
' ); + } +}; diff --git a/test/runtime/samples/if-block-first/main.html b/test/runtime/samples/if-block-first/main.html new file mode 100644 index 0000000000..bae6f01e10 --- /dev/null +++ b/test/runtime/samples/if-block-first/main.html @@ -0,0 +1,6 @@ +
+ {#if visible} +
i am visible
+ {/if} +
before me
+
\ No newline at end of file