Add missing runtime test, add contexts to SSR

pull/889/head
Jacob Mischka 7 years ago
parent 5d27d3fda7
commit ffbc991027
No known key found for this signature in database
GPG Key ID: 50A869F8CD9CBB9C

@ -18,6 +18,12 @@ export default function visitEachBlock(
const contexts = new Map(block.contexts); const contexts = new Map(block.contexts);
contexts.set(node.context, node.context); contexts.set(node.context, node.context);
if (node.destructuredContexts) {
for (const i = 0; i < node.destructuredContexts.length; i++) {
contexts.set(node.destructuredContexts[i], `${node.context}[${i}]`);
}
}
const indexes = new Map(block.indexes); const indexes = new Map(block.indexes);
if (node.index) indexes.set(node.index, node.context); if (node.index) indexes.set(node.index, node.context);

@ -0,0 +1,13 @@
export default {
data: {
animalPaws: {
raccoon: 'hands',
eagle: 'wings'
}
},
html: `
<p>raccoon: hands</p>
<p>eagle: wings</p>
`
};

@ -0,0 +1,3 @@
{{#each Object.entries(animalPaws) as [animal, pawType]}}
<p>{{animal}}: {{pawType}}</p>
{{/each}}
Loading…
Cancel
Save