Permalink
Browse files

Unroll the ( || ) in the math - Fixes #12497 - Thanks @lukemelia @cur…

…iousdannii - Closes gh-1019

(cherry picked from commit 8773067)
  • Loading branch information...
gnarf committed Nov 8, 2012
1 parent 08894dc commit 70f662bac5de1ed76021e31387bd4d3aa2e41f66
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/effects.js
View
@@ -82,7 +82,9 @@ function Animation( elem, properties, options ) {
tick = function() {
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- percent = 1 - ( remaining / animation.duration || 0 ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
index = 0,
length = animation.tweens.length;

0 comments on commit 70f662b

Please sign in to comment.