From a6d5e725e5f7a2a54b833541be27c5fbadf4499e Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Sun, 11 Jul 2021 12:13:19 +0000 Subject: [PATCH] create in transition even if intro is initialized --- src/compiler/compile/render_dom/wrappers/Element/index.ts | 2 +- test/runtime/samples/transition-css-in-out-in/_config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts index 20dfed891d..262751fb3a 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts @@ -754,7 +754,7 @@ export default class ElementWrapper extends Wrapper { intro_block = b` @add_render_callback(() => { if (${outro_name}) ${outro_name}.end(1); - if (!${intro_name}) ${intro_name} = @create_in_transition(${this.var}, ${fn}, ${snippet}); + ${intro_name} = @create_in_transition(${this.var}, ${fn}, ${snippet}); ${intro_name}.start(); }); `; diff --git a/test/runtime/samples/transition-css-in-out-in/_config.js b/test/runtime/samples/transition-css-in-out-in/_config.js index cd7ae14ce8..6d93c0e8c3 100644 --- a/test/runtime/samples/transition-css-in-out-in/_config.js +++ b/test/runtime/samples/transition-css-in-out-in/_config.js @@ -15,6 +15,6 @@ export default { component.visible = true; // reset original styles - assert.equal(div.style.animation, '__svelte_3809512021_1 100ms linear 0ms 1 both'); + assert.equal(div.style.animation, '__svelte_3809512021_0 100ms linear 0ms 1 both'); } };