Fix Invalid calling object in IE

with eval-source-map mode of webpack-dev-server

close #7060

ref https://github.com/vuejs/vue/issues/4465
This commit is contained in:
afc163 2017-08-03 10:58:55 +08:00
parent 50b9839bb3
commit 0a9a3887b5

View File

@ -16,7 +16,8 @@ export default function getRequestAnimationFrame() {
return () => {};
}
if (window.requestAnimationFrame) {
return window.requestAnimationFrame;
// https://github.com/vuejs/vue/issues/4465
return window.requestAnimationFrame.bind(window);
}
const prefix = availablePrefixs.filter(key => `${key}RequestAnimationFrame` in window)[0];