Browse Source

fix raf bind in IE9

Evan You 9 years ago
parent
commit
1ec501ebbf
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/platforms/web/runtime/transition-util.js

+ 4 - 1
src/platforms/web/runtime/transition-util.js

@@ -28,7 +28,10 @@ if (hasTransition) {
 }
 
 // binding to window is necessary to make hot reload work in IE in strict mode
-const raf = (inBrowser && window.requestAnimationFrame.bind(window)) || setTimeout
+const raf = inBrowser && window.requestAnimationFrame
+  ? window.requestAnimationFrame.bind(window)
+  : setTimeout
+
 export function nextFrame (fn: Function) {
   raf(() => {
     raf(fn)