Merge pull request #1775 from sveltejs/gh-1774

fix blocks inside <svelte:head>
pull/1792/head
Rich Harris 6 years ago committed by GitHub
commit 635348a919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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