Browse Source

Fix hot reload in IE in strict mode (#4724)

Fix #4465
Eduardo San Martin Morote 9 years ago
parent
commit
edb75c872c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/transition/transition.js

+ 4 - 1
src/transition/transition.js

@@ -32,9 +32,12 @@ const animDurationProp = animationProp + 'Duration'
  * transitions but not raf (e.g. Android 4.2 browser) - since
  * these environments are usually slow, we are giving it a
  * relatively large timeout.
+ * 
+ * Binding to window is necessary to make hot reload work in
+ * IE in strict mode
  */
 
-const raf = inBrowser && window.requestAnimationFrame
+const raf = inBrowser && window.requestAnimationFrame.bind(window)
 const waitForTransitionStart = raf
   /* istanbul ignore next */
   ? function (fn) { raf(function () { raf(fn) }) }