Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c55a494

Browse files
committed
fix(ngAnimate): ensure that minified repaint code isn't removed
Closes #9936
1 parent ffbeb32 commit c55a494

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
@@ -432,9 +432,11 @@ angular.module('ngAnimate', ['ng'])
432432
//so that all the animated elements within the animation frame
433433
//will be properly updated and drawn on screen. This is
434434
//required to perform multi-class CSS based animations with
435-
//Firefox. DO NOT REMOVE THIS LINE.
436-
var a = bod.offsetWidth + 1;
437-
fn();
435+
//Firefox. DO NOT REMOVE THIS LINE. DO NOT OPTIMIZE THIS LINE.
436+
//THE MINIFIER WILL REMOVE IT OTHERWISE WHICH WILL RESULT IN AN
437+
//UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND WILL
438+
//TAKE YEARS AWAY FROM YOUR LIFE!
439+
fn(bod.offsetWidth);
438440
});
439441
};
440442
}])

0 commit comments

Comments
 (0)