瀏覽代碼

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

Fix #4465
Eduardo San Martin Morote 9 年之前
父節點
當前提交
edb75c872c
共有 1 個文件被更改,包括 4 次插入1 次删除
  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) }) }