diff --git a/src/compile/render-dom/wrappers/Head.ts b/src/compile/render-dom/wrappers/Head.ts index b4b006f1a6..3cc6c7749c 100644 --- a/src/compile/render-dom/wrappers/Head.ts +++ b/src/compile/render-dom/wrappers/Head.ts @@ -21,7 +21,7 @@ export default class HeadWrapper extends Wrapper { renderer, block, node.children, - parent, + this, stripWhitespace, nextSibling ); diff --git a/test/runtime/samples/head-if-block/_config.js b/test/runtime/samples/head-if-block/_config.js new file mode 100644 index 0000000000..4c81e5e39d --- /dev/null +++ b/test/runtime/samples/head-if-block/_config.js @@ -0,0 +1,12 @@ +export default { + data: { + condition: false + }, + + test(assert, component, target, window) { + assert.equal(window.document.title, ''); + + component.set({ condition: true }); + assert.equal(window.document.title, 'woo!!!'); + } +}; \ No newline at end of file diff --git a/test/runtime/samples/head-if-block/main.html b/test/runtime/samples/head-if-block/main.html new file mode 100644 index 0000000000..27d994335d --- /dev/null +++ b/test/runtime/samples/head-if-block/main.html @@ -0,0 +1,5 @@ + + {#if condition} + woo!!! + {/if} + \ No newline at end of file