pull/924/head
Rich Harris 8 years ago
parent 9ff5e271ec
commit 99a3987aef

@ -5,12 +5,6 @@ import { Node } from '../../interfaces';
function noop () {}
function isElseIf(node: Node) {
return (
node && node.children.length === 1 && node.children[0].type === 'IfBlock'
);
}
const preprocessors = {
MustacheTag: noop,
RawMustacheTag: noop,
@ -21,21 +15,15 @@ const preprocessors = {
node: Node,
elementStack: Node[]
) => {
function attachBlocks(node: Node) {
preprocessChildren(generator, node, elementStack);
if (isElseIf(node.else)) {
attachBlocks(node.else.children[0]);
} else if (node.else) {
if (node.else) {
preprocessChildren(
generator,
node.else,
elementStack
);
}
}
attachBlocks(node);
},
EachBlock: (

Loading…
Cancel
Save