Merge pull request #1775 from sveltejs/gh-1774

fix blocks inside <svelte:head>
pull/7738/head
Rich Harris 7 years ago committed by GitHub
commit 1c1a062ed7

@ -21,7 +21,7 @@ export default class HeadWrapper extends Wrapper {
renderer,
block,
node.children,
parent,
this,
stripWhitespace,
nextSibling
);

@ -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!!!');
}
};

@ -0,0 +1,5 @@
<svelte:head>
{#if condition}
<title>woo!!!</title>
{/if}
</svelte:head>
Loading…
Cancel
Save