Просмотр исходного кода

fixed displaying of repeated warnings

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

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

@@ -56,6 +56,7 @@ this.hooksFrame = this.hooksFrame || (() => {
 			construct(FontFace, argumentsList) {
 				if (!warningFontFaceDisplayed) {
 					console.warn("SingleFile is hooking the FontFace constructor to get font URLs."); // eslint-disable-line no-console
+					warningFontFaceDisplayed = true;
 				}
 				const detail = {};
 				detail["font-family"] = argumentsList[0];
@@ -93,6 +94,7 @@ this.hooksFrame = this.hooksFrame || (() => {
 				construct(IntersectionObserver, argumentsList) {
 					if (!warningIntersectionObserverDisplayed) {
 						console.warn("SingleFile is hooking the IntersectionObserver API to detect and load deferred images."); // eslint-disable-line no-console
+						warningRequestAnimationFrameDisplayed = true;
 					}
 					const intersectionObserver = new IntersectionObserver(...argumentsList);
 					const callback = argumentsList[0];