Skip to content

Commit

Permalink
Revert "fix sveltejs#2908"
Browse files Browse the repository at this point in the history
This reverts commit 6e9f918.
  • Loading branch information
Harald-1 committed May 30, 2019
1 parent 6e9f918 commit 70d995a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/compiler/compile/render-dom/wrappers/EachBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,7 @@ export default class EachBlockWrapper extends Wrapper {
const dynamic = this.block.has_update_method;

const destroy = this.node.has_animation
? (this.block.has_outros
? `@fix_and_outro_and_destroy_block`
: `@fix_and_destroy_block`)
? `@fix_and_outro_and_destroy_block`
: this.block.has_outros
? `@outro_and_destroy_block`
: `@destroy_block`;
Expand Down
5 changes: 0 additions & 5 deletions src/runtime/internal/keyed-each.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ export function outro_and_destroy_block(block, lookup) {
block.o(1);
}

export function fix_and_destroy_block(block, lookup) {
block.f();
destroy_block(block, lookup);
}

export function fix_and_outro_and_destroy_block(block, lookup) {
block.f();
outro_and_destroy_block(block, lookup);
Expand Down
4 changes: 2 additions & 2 deletions test/js/samples/each-block-keyed-animated/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
detach,
element,
empty,
fix_and_destroy_block,
fix_and_outro_and_destroy_block,
fix_position,
init,
insert,
Expand Down Expand Up @@ -100,7 +100,7 @@ function create_fragment(ctx) {
p(changed, ctx) {
const each_value = ctx.things;
for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r();
each_blocks = update_keyed_each(each_blocks, changed, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, fix_and_destroy_block, create_each_block, each_1_anchor, get_each_context);
each_blocks = update_keyed_each(each_blocks, changed, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, fix_and_outro_and_destroy_block, create_each_block, each_1_anchor, get_each_context);
for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a();
},

Expand Down

0 comments on commit 70d995a

Please sign in to comment.