Skip to content

Commit

Permalink
Merge pull request zachfitz#148 from paroos/fix_motion_animateSlideIn…
Browse files Browse the repository at this point in the history
…RightDom

'Uncaught TypeError: Cannot read property 'className' of undefined'
  • Loading branch information
zachfitz committed Oct 20, 2015
2 parents f2f3c2e + 90dd6b2 commit 5999bdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/js/lib/_motion.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ module.exports = function(angularApp) {
var delayValue = offset / speed / options.finishDelayThrottle;
var delay = parseFloat(delayValue).toFixed(2);
}
animateSlideInRightDom[0].className += ' done';

var animateSlide = animateSlideInRightDom[0];

if(animateSlide) {
animateSlide.className += ' done';
}

}, speed * options.finishSpeedPercent);

Expand Down

0 comments on commit 5999bdf

Please sign in to comment.