mirror of https://github.com/sveltejs/svelte
Merge pull request #852 from sveltejs/gh-849
compile time error on slotted content inside if/each blocks. closes #849pull/855/head
commit
6ad8c38663
@ -0,0 +1,8 @@
|
|||||||
|
[{
|
||||||
|
"message": "Cannot place slotted elements inside an each-block",
|
||||||
|
"loc": {
|
||||||
|
"line": 3,
|
||||||
|
"column": 7
|
||||||
|
},
|
||||||
|
"pos": 43
|
||||||
|
}]
|
@ -0,0 +1,15 @@
|
|||||||
|
<Nested>
|
||||||
|
{{#each things as thing}}
|
||||||
|
<div slot='foo'>{{thing}}</div>
|
||||||
|
{{/each}}
|
||||||
|
</Nested>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Nested from './Nested.html';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Nested
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,8 @@
|
|||||||
|
[{
|
||||||
|
"message": "Cannot place slotted elements inside an if-block",
|
||||||
|
"loc": {
|
||||||
|
"line": 3,
|
||||||
|
"column": 7
|
||||||
|
},
|
||||||
|
"pos": 31
|
||||||
|
}]
|
@ -0,0 +1,15 @@
|
|||||||
|
<Nested>
|
||||||
|
{{#if thing}}
|
||||||
|
<div slot='foo'>{{thing}}</div>
|
||||||
|
{{/if}}
|
||||||
|
</Nested>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Nested from './Nested.html';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Nested
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in new issue