pull/489/head
Rich-Harris 8 years ago
parent 7132551183
commit 3cfb823076

@ -47,7 +47,13 @@ export default function dom ( parsed, source, options ) {
const { computations, hasJs, templateProperties, namespace } = generator.parseJs();
const { block, state } = preprocess( generator, parsed.html.children, namespace );
const block = preprocess( generator, parsed.html.children );
const state = {
namespace,
parentNode: null,
isTopLevel: true
};
parsed.html.children.forEach( node => {
visit( generator, block, state, node );

@ -111,7 +111,7 @@ function preprocessChildren ( generator, block, children ) {
});
}
export default function preprocess ( generator, children, namespace ) {
export default function preprocess ( generator, children ) {
const block = new Block({
generator,
name: generator.alias( 'create_main_fragment' ),
@ -127,13 +127,7 @@ export default function preprocess ( generator, children, namespace ) {
dependencies: new Set()
});
const state = {
namespace,
parentNode: null,
isTopLevel: true
};
preprocessChildren( generator, block, children );
return { block, state };
return block;
}
Loading…
Cancel
Save