We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dfe4f11 + 83793ba commit 23b53cbCopy full SHA for 23b53cb
lib/velocity-animate-shim.js
@@ -3,7 +3,13 @@
3
// that they'll render, rather than doing something clever like
4
// statically rendering the end state of any provided animations.
5
if (typeof window !== 'undefined') {
6
- module.exports = require('velocity-animate');
+
7
+ // this is how velocity-ui finds the Velocity instance, so lets make sure we find the right instance
8
+ var g = (window.jQuery || window.Zepto || window);
9
10
+ // require Velocity if it doesn't already exist
11
+ module.exports = g.Velocity ? g.Velocity : require('velocity-animate');
12
13
} else {
14
var Velocity = function () {};
15
Velocity.velocityReactServerShim = true;
0 commit comments