diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 90e1165af..c791ab3e5 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -663,12 +663,12 @@ PDFJS.compatibilityChecked = true; if ('requestAnimationFrame' in window) { return; } - window.requestAnimationFrame = - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame; - if (!('requestAnimationFrame' in window)) { - installFakeAnimationFrameFunctions(); + window.requestAnimationFrame = window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame; + if (window.requestAnimationFrame) { + return; } + installFakeAnimationFrameFunctions(); })(); // Support: Android, iOS