Merge branch 'fix-each-block' of https://github.com/hperrin/svelte into hperrin-fix-each-block

pull/613/head
Rich Harris 8 years ago
commit ce8dd647f0

@ -139,7 +139,7 @@ function keyed ( generator: DomGenerator, block: Block, state: State, node: Node
block.builders.mount.addBlock( deindent`
var ${iteration} = ${head};
while ( ${iteration} ) {
${iteration}.${mountOrIntro}( ${block.target}, null );
${iteration}.${mountOrIntro}( ${block.target}, anchor );
${iteration} = ${iteration}.next;
}
` );
@ -284,7 +284,7 @@ function unkeyed ( generator: DomGenerator, block: Block, state: State, node: No
if ( !state.parentNode ) {
block.builders.mount.addBlock( deindent`
for ( var ${i} = 0; ${i} < ${iterations}.length; ${i} += 1 ) {
${iterations}[${i}].${mountOrIntro}( ${block.target}, null );
${iterations}[${i}].${mountOrIntro}( ${block.target}, anchor );
}
` );
}

@ -154,7 +154,7 @@ function create_main_fragment ( state, component ) {
return {
mount: function ( target, anchor ) {
for ( var i = 0; i < each_block_iterations.length; i += 1 ) {
each_block_iterations[i].mount( target, null );
each_block_iterations[i].mount( target, anchor );
}
insertNode( text, target, anchor );

@ -154,7 +154,7 @@ function create_main_fragment ( state, component ) {
return {
mount: function ( target, anchor ) {
for ( var i = 0; i < each_block_iterations.length; i += 1 ) {
each_block_iterations[i].mount( target, null );
each_block_iterations[i].mount( target, anchor );
}
insertNode( text, target, anchor );

@ -19,7 +19,7 @@ function create_main_fragment ( state, component ) {
return {
mount: function ( target, anchor ) {
for ( var i = 0; i < each_block_iterations.length; i += 1 ) {
each_block_iterations[i].mount( target, null );
each_block_iterations[i].mount( target, anchor );
}
insertNode( text, target, anchor );

Loading…
Cancel
Save