From fb43a1b86d4ba4b1daacddf12ebbda70932c7910 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Tue, 13 Oct 2015 12:52:41 +0800 Subject: [PATCH] fix anim server render --- components/common/openAnimation.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/common/openAnimation.js b/components/common/openAnimation.js index ab3b4fe0f0..dc6c529a5d 100644 --- a/components/common/openAnimation.js +++ b/components/common/openAnimation.js @@ -1,4 +1,7 @@ -import velocity from 'velocity-animate'; +let velocity; +if (typeof document !== 'undefined' && typeof window !== 'undefined') { + velocity = require('velocity-animate'); +} function animate(node, show, transitionName, done) { let ok; @@ -37,4 +40,4 @@ const animation = { }, }; -export default animation; +module.exports = animation; -- GitLab