]> source.dussan.org Git - jquery.git/commitdiff
Unroll the ( || ) in the math - Fixes #12497 - Thanks @lukemella @curiousdannii ...
authorCorey Frang <gnarf@gnarf.net>
Thu, 8 Nov 2012 03:29:55 +0000 (21:29 -0600)
committerCorey Frang <gnarf@gnarf.net>
Thu, 8 Nov 2012 03:29:55 +0000 (21:29 -0600)
src/effects.js

index 4b6b2e4da752784e9e06b68306427723cde04339..bfe282aa5610de0f02c0e588b79e09f6d1edc566 100644 (file)
@@ -81,7 +81,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;