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