From 14b07dcc332cde36f9069cde053b26149a8e88a7 Mon Sep 17 00:00:00 2001 From: "Benjamin W. Broersma" Date: Sun, 5 May 2019 22:16:17 +0200 Subject: [PATCH] Fixing #2689 correctly, checking outro.is_local for adding if(local). --- src/compiler/compile/render-dom/wrappers/EachBlock.ts | 2 +- src/compiler/compile/render-dom/wrappers/Element/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/render-dom/wrappers/EachBlock.ts b/src/compiler/compile/render-dom/wrappers/EachBlock.ts index b2dd5a7508c6..9d23eb73099f 100644 --- a/src/compiler/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compiler/compile/render-dom/wrappers/EachBlock.ts @@ -510,7 +510,7 @@ export default class EachBlockWrapper extends Wrapper { if (outro_block) { block.builders.outro.add_block(deindent` ${iterations} = ${iterations}.filter(Boolean); - for (let #i = 0; #i < ${view_length}; #i += 1) ${outro_block}(#i, 0);` + for (let #i = 0; #i < ${view_length}; #i += 1) ${outro_block}(#i, 0, 0);` ); } diff --git a/src/compiler/compile/render-dom/wrappers/Element/index.ts b/src/compiler/compile/render-dom/wrappers/Element/index.ts index 41db1c03a04b..7d458481f1f8 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/index.ts @@ -744,7 +744,7 @@ export default class ElementWrapper extends Wrapper { ${outro_name} = @create_out_transition(${this.var}, ${fn}, ${snippet}); `; - if (outro_block) { + if (outro.is_local) { outro_block = deindent` if (#local) { ${outro_block}