Skip to content

Commit b041b66

Browse files
committed
fix(ngAnimate): ensure that minified repaint code isn't removed
Closes angular#9936
1 parent 996c7a0 commit b041b66

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ngAnimate/animate.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,11 @@ angular.module('ngAnimate', ['ng'])
290290
//so that all the animated elements within the animation frame
291291
//will be properly updated and drawn on screen. This is
292292
//required to perform multi-class CSS based animations with
293-
//Firefox. DO NOT REMOVE THIS LINE.
294-
var a = bod.offsetWidth + 1;
295-
fn();
293+
//Firefox. DO NOT REMOVE THIS LINE. DO NOT OPTIMIZE THIS LINE.
294+
//THE MINIFIER WILL REMOVE IT OTHERWISE WHICH WILL RESULT IN AN
295+
//UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND WILL
296+
//TAKE YEARS AWAY FROM YOUR LIFE!
297+
fn(bod.offsetWidth);
296298
});
297299
};
298300
}])

0 commit comments

Comments
 (0)