|
|
@@ -154,11 +154,9 @@ this.hooksFrame = this.hooksFrame || (() => {
|
|
|
window.requestAnimationFrame.toString = function () { return "requestAnimationFrame() { [native code] }"; };
|
|
|
|
|
|
window.cancelAnimationFrame = function (id) {
|
|
|
- const pendingCallDeleted = pendingRequestAnimationFrameCalls.delete(id);
|
|
|
- if (loadDeferredImages || !pendingCallDeleted) {
|
|
|
- if (loadDeferredImages) {
|
|
|
- return clearTimeout(id);
|
|
|
- }
|
|
|
+ pendingRequestAnimationFrameCalls.delete(id);
|
|
|
+ if (loadDeferredImages) {
|
|
|
+ return clearTimeout(id);
|
|
|
} else {
|
|
|
return cancelAnimationFrame(id);
|
|
|
}
|