]> source.dussan.org Git - jquery.git/commitdiff
Unroll the ( || ) in the math - Fixes #12497 - Thanks @lukemelia @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:32:31 +0000 (21:32 -0600)
(cherry picked from commit 877306738f931a711c41d907e69fc8930f985830)

src/effects.js

index da1d0a08f638cdc8ae0ac85f33157bac66024998..e6ca38bfa611f9bd860d28f634c333926512d719 100644 (file)
@@ -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;