From c1c8b850108f22048dcf34dcff3bc2c13238351b Mon Sep 17 00:00:00 2001 From: Demetrio Girardi Date: Mon, 8 Jul 2024 07:22:29 -0700 Subject: [PATCH] Re-check if frame is already present --- src/adRendering.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/adRendering.js b/src/adRendering.js index 93493cffa7f..3f9b9353384 100644 --- a/src/adRendering.js +++ b/src/adRendering.js @@ -256,9 +256,7 @@ export function insertLocatorFrame() { const frame = createInvisibleIframe(); frame.name = PB_LOCATOR; if (!document.body) { - window.requestAnimationFrame(() => { - document.body.appendChild(frame); - }); + window.requestAnimationFrame(insertLocatorFrame); } else { document.body.appendChild(frame); }