Skip to content

Commit 5cd2ec9

Browse files
authoredDec 20, 2016
Merge pull request #217 from sveltejs/gh-216
handle directives on components
2 parents b23572d + e7dd885 commit 5cd2ec9

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed
 

‎src/generators/server-side-rendering/visitors/Component.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export default {
99
}
1010

1111
const props = node.attributes.map( attribute => {
12+
if ( attribute.type !== 'Attribute' ) return;
13+
1214
let value;
1315

1416
if ( attribute.value === true ) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>widget</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div><p>widget</p></div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div><p>widget</p></div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div><Widget ref:widget/></div>
2+
3+
<script>
4+
import Widget from './Widget.html';
5+
6+
export default {
7+
components: { Widget }
8+
};
9+
</script>

0 commit comments

Comments
 (0)
Please sign in to comment.