From 90b23e2819a656c2fb805b785f5593e83874004b Mon Sep 17 00:00:00 2001 From: Harald Fassler Date: Thu, 30 May 2019 14:30:27 +0200 Subject: [PATCH] follow-up fix to #2871 --- src/compiler/compile/render-dom/wrappers/Element/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/compile/render-dom/wrappers/Element/index.ts b/src/compiler/compile/render-dom/wrappers/Element/index.ts index f05263f544..e7a77544ba 100644 --- a/src/compiler/compile/render-dom/wrappers/Element/index.ts +++ b/src/compiler/compile/render-dom/wrappers/Element/index.ts @@ -775,10 +775,12 @@ export default class ElementWrapper extends Wrapper { ${rect} = ${this.var}.getBoundingClientRect(); `); + const prepare_outro = outro ? `@prepare_outro(${this.var}, ${rect})` : ``; block.builders.fix.add_block(deindent` @fix_position(${this.var}); ${stop_animation}(); - ` + (outro ? `@prepare_outro(${this.var}, ${rect})` : ``)); + ${prepare_outro} + `); const params = this.node.animation.expression ? this.node.animation.expression.render(block) : '{}';