Gildas 7 лет назад
Родитель
Сommit
f6dd698677
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      lib/hooks/hooks-frame.js

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