fix blocks inside <svelte:head> - closes #1774

pull/1775/head
Rich Harris 6 years ago
parent c0ba6fb4ef
commit 337b62be6f

@ -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