1
0
Gildas 7 жил өмнө
parent
commit
f6dd698677

+ 2 - 2
lib/hooks/hooks-frame.js

@@ -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);