Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/QueueAnim.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
import React, { createElement, cloneElement } from 'react';
import { findDOMNode } from 'react-dom';
import velocity from 'velocity-animate';

let velocity;
if ( typeof document !== 'undefined' && typeof window !== 'undefined' ) {
// only load velocity on the client
velocity = require('velocity-animate');
} else {
// provide a velocity stub for the server
velocity = function velocityServerDummy() {
const callback = arguments[arguments.length - 1];
// call after stack flushes
// in case you app depends on the asyncron nature of this function
setImmediate(function() { callback(); });
};
}

import {
toArrayChildren,
findChildInChildrenByKey,
Expand Down