diff --git a/src/js/util/animation.js b/src/js/util/animation.js
index <HASH>..<HASH> 100644
--- a/src/js/util/animation.js
+++ b/src/js/util/animation.js
@@ -86,7 +86,8 @@ export function animate(element, animation, duration = 200, origin, out) {
             addClass(element, animation, animationPrefix + (out ? 'leave' : 'enter'));
 
             if (startsWith(animation, animationPrefix)) {
-                addClass(element, origin && `uk-transform-origin-${origin}`, out && `${animationPrefix}reverse`);
+                origin && addClass(element, `uk-transform-origin-${origin}`);
+                out && addClass(element, `${animationPrefix}reverse`);
             }
 
         })
fix: animation adds `false` and `undefined` as class