From 089f02a4d0c354a882b1137df6f7c82050aa4d45 Mon Sep 17 00:00:00 2001 From: JK Date: Fri, 13 Oct 2017 21:05:53 +0800 Subject: [PATCH] fix(transition-group): work around rollup tree shaking (#6796) fix #6792 --- src/platforms/web/runtime/components/transition-group.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platforms/web/runtime/components/transition-group.js b/src/platforms/web/runtime/components/transition-group.js index b0133d71b3c..219ff01cf54 100644 --- a/src/platforms/web/runtime/components/transition-group.js +++ b/src/platforms/web/runtime/components/transition-group.js @@ -101,8 +101,9 @@ export default { children.forEach(applyTranslation) // force reflow to put everything in position - const body: any = document.body - const f: number = body.offsetHeight // eslint-disable-line + // assign to this to avoid being removed in tree-shaking + // $flow-disable-line + this._reflow = document.body.offsetHeight children.forEach((c: VNode) => { if (c.data.moved) {