mirror of https://github.com/sveltejs/svelte
only call .update on yield fragment if it's present (#514)
parent
1fd3c21194
commit
2adfa2e92e
@ -0,0 +1 @@
|
||||
<b>{{yield}}</b>
|
@ -0,0 +1,12 @@
|
||||
export default {
|
||||
html: `
|
||||
<b>Hello</b>
|
||||
`,
|
||||
|
||||
test ( assert, component, target ) {
|
||||
component.set( { name: 'World' } );
|
||||
assert.htmlEqual( target.innerHTML, `
|
||||
<b>Hello</b> World
|
||||
` );
|
||||
}
|
||||
};
|
@ -0,0 +1,12 @@
|
||||
<Widget>Hello</Widget> {{name}}
|
||||
|
||||
<script>
|
||||
import Widget from './Widget.html';
|
||||
|
||||
export default {
|
||||
components: { Widget },
|
||||
data() {
|
||||
return { name: '' };
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue